/* ************************************************************************************** *ov2710_aw6131.c *A V4L2 driver for OV2710_AW6131 cameras *Copyright (c) 2014 by Allwinnertech Co., Ltd.http://www.allwinnertech.com * Version Author Date Description * 1.0 liu baihao 2016/1/15 OV2710_AW6131 YUV sensor Support(liubaihao@sina.com) **************************************************************************************** */ #include #include #include #include #include #include #include #include #include #include #include #include "camera.h" #include "sensor_helper.h" MODULE_AUTHOR("liubaihao"); MODULE_DESCRIPTION("A low-level driver for OV2710_xc6130 sensors"); MODULE_LICENSE("GPL"); /*for internel driver debug*/ #define DEV_DBG_EN 0 #ifdef DEV_DBG_EN #define vfe_dev_dbg(x, arg...) printk("[OV2710_xc6130]"x, ##arg) #else #define vfe_dev_dbg(x, arg...) #endif #define vfe_dev_err(x, arg...) printk("[OV2710_xc6130]"x, ##arg) #define vfe_dev_print(x, arg...) printk("[OV2710_xc6130 ]"x, ##arg) #define LOG_ERR_RET(x) { \ int ret; \ ret = x; \ if (ret < 0) {\ vfe_dev_err("error at %s\n", __func__); \ return ret; \ } \ } /*define module timing*/ #define MCLK (24*1000*1000) #define VREF_POL V4L2_MBUS_VSYNC_ACTIVE_LOW #define HREF_POL V4L2_MBUS_HSYNC_ACTIVE_HIGH #define CLK_POL V4L2_MBUS_PCLK_SAMPLE_RISING #define V4L2_IDENT_SENSOR 0x6131 /* * Our nominal (default) frame rate. */ #ifdef FPGA #define SENSOR_FRAME_RATE 15 #else #define SENSOR_FRAME_RATE 25 #endif /* * The OV2710_xc6130 i2c address */ #define OV2710_WRITE_ADDR (0x36) #define OV2710_READ_ADDR (0x37) /*static struct delayed_work sensor_s_ae_ratio_work;*/ static struct v4l2_subdev *glb_sd; static bool restart; #define SENSOR_NAME "ov2710_aw6131" /* * Information we maintain about a known sensor. */ struct sensor_format_struct; /* coming later */ struct cfg_array { /* coming later */ struct regval_list *regs; int size; }; static int sensor_init_restart(struct v4l2_subdev *sd, u32 val); static inline struct sensor_info *to_state(struct v4l2_subdev *sd) { return container_of(sd, struct sensor_info, sd); } /* * The default register settings * */ static struct regval_list sensor_default_regs[] = { {0xfffd, 0x80}, {0xfffe, 0x80}, {0x001c, 0xff}, {0x001d, 0xff}, {0x001e, 0xff}, {0x001f, 0xff}, {0x0018, 0x00}, {0x0019, 0x00}, {0x001a, 0x00}, {0x001b, 0x00}, {0x00bc, 0x19}, {0x00bd, 0x00}, {0x00be, 0x00}, {0x00bf, 0x00}, {0x0021, 0x0e}, {0x0022, 0x00}, {0x0023, 0x00}, {0x0025, 0x0e}, {0x0026, 0x01}, {0x0027, 0x0e}, {0x0020, 0x01}, {0x0024, 0x05}, {0x0030, 0x62}, {0x0031, 0x20}, {0x0032, 0x60}, {0x0033, 0x12}, {0xfffd, 0x80}, {0xfffe, 0x25}, {0x0002, 0x80}, {0xfffe, 0x26}, {0x0002, 0x00}, {0x0000, 0x00}, /* mipi rx one lane mode */ {0xfffe, 0x80}, {0x0050, 0x06}, {0x0054, 0x06}, {0x0058, 0x04}, {0x0058, 0x02}, {0x0038, 0x01}, /* mipi rx use data 0 only */ {0xfffd, 0x80}, {0xfffe, 0x80}, {0x00bc, 0x91}, {0x001b, 0x00}, {0x0090, 0x28}, /*0x28 normal ;0x2b color bar test */ {0xfffe, 0x26}, {0x0000, 0x00}, {0x0009, 0x04}, {0x4000, 0xF9}, {0x6001, 0x14}, {0x6005, 0xc4}, {0x6006, 0x0F}, {0x6007, 0xA0}, {0x6008, 0x0E}, {0x6009, 0xFC}, {0x8000, 0x3f}, {0x8001, 0x80}, {0x8002, 0x07}, {0x8003, 0x38}, {0x8004, 0x04}, {0x8005, 0x03}, {0x8006, 0x05}, {0x8007, 0x99}, {0x8010, 0x04}, {0x2019, 0x07}, {0x201a, 0x80}, {0x201b, 0x04}, {0x201c, 0x38}, {0x201d, 0x00}, {0x201e, 0x00}, {0x201f, 0x00}, {0x2020, 0x00}, {0x2015, 0x80}, {0x2017, 0x1e}, {0x2018, 0x1e}, {0x2023, 0x03}, {0x8012, 0x80}, {0x8013, 0x07}, {0x8014, 0x38}, {0x8015, 0x04}, {0x8016, 0x00}, {0x8017, 0x00}, {0x8018, 0x00}, {0x8019, 0x00}, {0xfffe, 0x21}, {0x0001, 0x80}, {0x0004, 0x10}, {0x0708, 0x00}, {0x0072, 0x00}, {0x0074, 0x00}, {0x0006, 0x07}, {0x0007, 0x80}, {0x0008, 0x04}, {0x0009, 0x38}, {0x000a, 0x07}, {0x000b, 0x80}, {0x000c, 0x04}, {0x000d, 0x38}, {0x001e, 0x07}, {0x001f, 0x80}, {0x0020, 0x04}, {0x0021, 0x38}, {0x005e, 0x7F}, {0x005f, 0x07}, {0x0060, 0x37}, {0x0061, 0x04}, {0x0064, 0x80}, {0x0065, 0x07}, {0x0066, 0x38}, {0x0067, 0x04}, {0x0076, 0x07}, {0x0077, 0x80}, {0x0078, 0x04}, {0x0079, 0x38}, {0x0700, 0x00}, {0x0701, 0x00}, {0x0702, 0x00}, {0x0703, 0x00}, {0x0704, 0x07}, {0x0705, 0x80}, {0x0706, 0x04}, {0x0707, 0x38}, {0x006c, 0x20}, {0xfffe, 0x21}, {0x0001, 0x80}, {0x0004, 0x10}, /*sensor set */ /*delay 5 ms */ {0xffff, 0x05}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0004, 0x00}, {0xfffd, 0x80}, {0xfffe, 0x14}, {0x1c00, 0x4c}, /*add three register for mirror & flip */ {0x1c01, 0x31}, {0x1C02, 0x03}, {0x1C03, 0x93}, {0x1C04, 0x30}, {0x1C05, 0x08}, {0x1C06, 0x82}, {0x1C07, 0x30}, {0x1C08, 0x08}, {0x1C09, 0x42}, {0x1C0A, 0x30}, {0x1C0B, 0x17}, {0x1C0C, 0x7f}, {0x1C0D, 0x30}, {0x1C0E, 0x18}, {0x1C0F, 0xfc}, {0x1C10, 0x37}, {0x1C11, 0x06}, {0x1C12, 0x61}, {0x1C13, 0x37}, {0x1C14, 0x12}, {0x1C15, 0x0c}, {0x1C16, 0x36}, {0x1C17, 0x30}, {0x1C18, 0x6d}, {0x1C19, 0x38}, {0x1C1A, 0x01}, {0x1C1B, 0xb4}, {0x1C1C, 0x36}, {0x1C1D, 0x21}, {0x1C1E, 0x04}, {0x1C1F, 0x36}, {0x1C20, 0x04}, {0x1C21, 0x60}, {0x1C22, 0x36}, {0x1C23, 0x03}, {0x1C24, 0xa7}, {0x1C25, 0x36}, {0x1C26, 0x31}, {0x1C27, 0x26}, {0x1C28, 0x36}, {0x1C29, 0x00}, {0x1C2A, 0x04}, {0x1C2B, 0x36}, {0x1C2C, 0x20}, {0x1C2D, 0x37}, {0x1C2E, 0x36}, {0x1C2F, 0x23}, {0x1C30, 0x00}, {0x1C31, 0x37}, {0x1C32, 0x02}, {0x1C33, 0x9e}, {0x1C34, 0x37}, {0x1C35, 0x03}, {0x1C36, 0x5c}, {0x1C37, 0x37}, {0x1C38, 0x04}, {0x1C39, 0x40}, {0x1C3A, 0x37}, {0x1C3B, 0x0D}, {0x1C3C, 0x0f}, {0x1C3D, 0x37}, {0x1C3E, 0x13}, {0x1C3F, 0x9f}, {0x1C40, 0x37}, {0x1C41, 0x14}, {0x1C42, 0x4c}, {0x1C43, 0x37}, {0x1C44, 0x10}, {0x1C45, 0x9e}, {0x1C46, 0x38}, {0x1C47, 0x01}, {0x1C48, 0xc4}, {0x1C49, 0x36}, {0x1C4A, 0x05}, {0x1C4B, 0x05}, {0x1C4C, 0x36}, {0x1C4D, 0x06}, {0x1C4E, 0x3f}, {0x1C4F, 0x30}, {0x1C50, 0x2D}, {0x1C51, 0x90}, {0x1C52, 0x37}, {0x1C53, 0x0B}, {0x1C54, 0x40}, {0x1C55, 0x37}, {0x1C56, 0x16}, {0x1C57, 0x31}, {0x1C58, 0x37}, {0x1C59, 0x07}, {0x1C5A, 0x52}, {0x1C5B, 0x38}, {0x1C5C, 0x0D}, {0x1C5D, 0x74}, {0x1C5E, 0x51}, {0x1C5F, 0x81}, {0x1C60, 0x20}, {0x1C61, 0x51}, {0x1C62, 0x8F}, {0x1C63, 0x00}, {0x1C64, 0x43}, {0x1C65, 0x01}, {0x1C66, 0xff}, {0x1C67, 0x43}, {0x1C68, 0x03}, {0x1C69, 0x00}, {0x1C6A, 0x3A}, {0x1C6B, 0x00}, {0x1C6C, 0x78}, {0x1C6D, 0x30}, {0x1C6E, 0x0F}, {0x1C6F, 0xc3}, {0x1C70, 0x30}, {0x1C71, 0x10}, {0x1C72, 0x10}, {0x1C73, 0x30}, {0x1C74, 0x12}, {0x1C75, 0x02}, {0x1C76, 0x3A}, {0x1C77, 0x1A}, {0x1C78, 0x06}, {0x1C79, 0x3A}, {0x1C7A, 0x18}, {0x1C7B, 0x00}, {0x1C7C, 0x3A}, {0x1C7D, 0x19}, {0x1C7E, 0x7a}, {0x1C7F, 0x3A}, {0x1C80, 0x13}, {0x1C81, 0x54}, {0x1C82, 0x38}, {0x1C83, 0x2E}, {0x1C84, 0x0f}, {0x1C85, 0x38}, {0x1C86, 0x1A}, {0x1C87, 0x1a}, {0x1C88, 0x40}, {0x1C89, 0x1D}, {0x1C8A, 0x02}, {0x1C8B, 0x56}, {0x1C8C, 0x88}, {0x1C8D, 0x03}, {0x1C8E, 0x56}, {0x1C8F, 0x84}, {0x1C90, 0x07}, {0x1C91, 0x56}, {0x1C92, 0x85}, {0x1C93, 0xa0}, {0x1C94, 0x56}, {0x1C95, 0x86}, {0x1C96, 0x04}, {0x1C97, 0x56}, {0x1C98, 0x87}, {0x1C99, 0x43}, {0x1C9A, 0x30}, {0x1C9B, 0x17}, {0x1C9C, 0x00}, {0x1C9D, 0x30}, {0x1C9E, 0x18}, {0x1C9F, 0x00}, {0x1CA0, 0x30}, {0x1CA1, 0x0E}, {0x1CA2, 0x04}, {0x1CA3, 0x48}, {0x1CA4, 0x01}, {0x1CA5, 0x0f}, {0x1CA6, 0x3A}, {0x1CA7, 0x0F}, {0x1CA8, 0x40}, {0x1CA9, 0x3A}, {0x1CAA, 0x10}, {0x1CAB, 0x38}, {0x1CAC, 0x3A}, {0x1CAD, 0x1B}, {0x1CAE, 0x48}, {0x1CAF, 0x3A}, {0x1CB0, 0x1E}, {0x1CB1, 0x30}, {0x1CB2, 0x3A}, {0x1CB3, 0x11}, {0x1CB4, 0x90}, {0x1CB5, 0x3A}, {0x1CB6, 0x1F}, {0x1CB7, 0x10}, {0x1CB8, 0x34}, {0x1CB9, 0x01}, {0x1CBA, 0x00}, {0x1CBB, 0x34}, {0x1CBC, 0x02}, {0x1CBD, 0x04}, {0x1CBE, 0x34}, {0x1CBF, 0x03}, {0x1CC0, 0x00}, {0x1CC1, 0x34}, {0x1CC2, 0x04}, {0x1CC3, 0x04}, {0x1CC4, 0x34}, {0x1CC5, 0x05}, {0x1CC6, 0x00}, {0x1CC7, 0x50}, {0x1CC8, 0x01}, {0x1CC9, 0x4e}, {0x1CCA, 0x50}, {0x1CCB, 0x00}, {0x1CCC, 0x5f}, {0x1CCD, 0x30}, {0x1CCE, 0x08}, {0x1CCF, 0x02}, {0x1CD0, 0x3A}, {0x1CD1, 0x00}, {0x1CD2, 0x38}, {0x1CD3, 0x35}, {0x1CD4, 0x03}, {0x1CD5, 0x37}, {0x1CD6, 0x30}, {0x1CD7, 0x11}, {0x1CD8, 0x19}, {0x1cD9, 0x38}, /* set sensor mirror&flip */ {0x1cDa, 0x18}, {0x1cDb, 0xe0}, {0x1cDc, 0x36}, {0x1cDd, 0x21}, {0x1cDe, 0x14}, {0x1cDf, 0x38}, {0x1ce0, 0x03}, {0x1ce1, 0x09}, {0x1CE2, 0x30}, {0x1CE3, 0x30}, {0x1CE4, 0x2b}, {0x1CE5, 0x00}, {0x1CE6, 0x00}, {0x1CE7, 0x00}, {0x1CE8, 0x00}, {0x1CE9, 0x00}, {0x1CEA, 0x00}, {0x1CEB, 0x00}, {0x1CEC, 0x00}, {0x1CED, 0x00}, {0x1CEE, 0x00}, {0x1CEF, 0x00}, {0x1CF0, 0x00}, {0x1CF1, 0x00}, {0x1CF2, 0x00}, {0x1CF3, 0x00}, {0x1CF4, 0x00}, {0x1CF5, 0x00}, {0x1CF6, 0x00}, {0x1CF7, 0x00}, {0x1CF8, 0x00}, {0x1CF9, 0x00}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0007, 0x6c}, {0x000d, 0x31}, {0x0009, 0x00}, {0x00c4, 0x10}, {0x00c0, 0x01}, {0xfffd, 0x80}, {0xfffe, 0x14}, {0x0021, 0x00}, {0x0022, 0x01}, {0x0088, 0x10}, {0x0089, 0x10}, {0x008a, 0x20}, {0x008c, 0x10}, {0x003d, 0x68}, {0x0036, 0x00}, {0x0037, 0x8f}, {0x008e, 0x45}, {0x008f, 0x00}, {0xfffd, 0x80}, {0xfffe, 0x14}, {0x100c, 0x9c}, {0x100d, 0x21}, {0x100e, 0xff}, {0x100f, 0xf0}, {0x1010, 0xd4}, {0x1011, 0x01}, {0x1012, 0x48}, {0x1013, 0x00}, {0x1014, 0xd4}, {0x1015, 0x01}, {0x1016, 0x50}, {0x1017, 0x04}, {0x1018, 0xd4}, {0x1019, 0x01}, {0x101a, 0x60}, {0x101b, 0x08}, {0x101c, 0xd4}, {0x101d, 0x01}, {0x101e, 0x70}, {0x101f, 0x0c}, {0x1020, 0x19}, {0x1021, 0xc0}, {0x1022, 0x00}, {0x1023, 0x14}, {0x1024, 0xa9}, {0x1025, 0xce}, {0x1026, 0x00}, {0x1027, 0x18}, {0x1028, 0x84}, {0x1029, 0x6e}, {0x102a, 0x00}, {0x102b, 0x00}, {0x102c, 0x84}, {0x102d, 0x63}, {0x102e, 0x00}, {0x102f, 0x08}, {0x1030, 0xbc}, {0x1031, 0xa3}, {0x1032, 0x03}, {0x1033, 0xff}, {0x1034, 0x0c}, {0x1035, 0x00}, {0x1036, 0x00}, {0x1037, 0x08}, {0x1038, 0x9d}, {0x1039, 0x80}, {0x103a, 0x01}, {0x103b, 0xff}, {0x103c, 0xbc}, {0x103d, 0xa3}, {0x103e, 0x01}, {0x103f, 0xff}, {0x1040, 0x10}, {0x1041, 0x00}, {0x1042, 0x00}, {0x1043, 0x97}, {0x1044, 0xbc}, {0x1045, 0xa3}, {0x1046, 0x00}, {0x1047, 0xff}, {0x1048, 0x9c}, {0x1049, 0x63}, {0x104a, 0xfe}, {0x104b, 0x00}, {0x104c, 0xb8}, {0x104d, 0x83}, {0x104e, 0x00}, {0x104f, 0x45}, {0x1050, 0x9d}, {0x1051, 0x84}, {0x1052, 0x01}, {0x1053, 0xf0}, {0x1054, 0x19}, {0x1055, 0x40}, {0x1056, 0x80}, {0x1057, 0x80}, {0x1058, 0xa8}, {0x1059, 0x6a}, {0x105a, 0x01}, {0x105b, 0x04}, {0x105c, 0x8c}, {0x105d, 0x63}, {0x105e, 0x00}, {0x105f, 0x00}, {0x1060, 0xbc}, {0x1061, 0x03}, {0x1062, 0x00}, {0x1063, 0x00}, {0x1064, 0x0c}, {0x1065, 0x00}, {0x1066, 0x00}, {0x1067, 0x96}, {0x1068, 0x15}, {0x1069, 0x00}, {0x106a, 0x00}, {0x106b, 0x00}, {0x106c, 0x84}, {0x106d, 0x6e}, {0x106e, 0x00}, {0x106f, 0x00}, {0x1070, 0xa4}, {0x1071, 0x8c}, {0x1072, 0x00}, {0x1073, 0xff}, {0x1074, 0x8c}, {0x1075, 0xa3}, {0x1076, 0x00}, {0x1077, 0x1f}, {0x1078, 0x07}, {0x1079, 0xfb}, {0x107a, 0x23}, {0x107b, 0x70}, {0x107c, 0x94}, {0x107d, 0x63}, {0x107e, 0x00}, {0x107f, 0x40}, {0x1080, 0x84}, {0x1081, 0x6e}, {0x1082, 0x00}, {0x1083, 0x00}, {0x1084, 0xb8}, {0x1085, 0x8c}, {0x1086, 0x00}, {0x1087, 0x48}, {0x1088, 0x8c}, {0x1089, 0xa3}, {0x108a, 0x00}, {0x108b, 0x1f}, {0x108c, 0xa4}, {0x108d, 0x84}, {0x108e, 0x00}, {0x108f, 0xff}, {0x1090, 0x07}, {0x1091, 0xfb}, {0x1092, 0x23}, {0x1093, 0x6a}, {0x1094, 0x94}, {0x1095, 0x63}, {0x1096, 0x00}, {0x1097, 0x42}, {0x1098, 0xa8}, {0x1099, 0x6a}, {0x109a, 0x01}, {0x109b, 0x24}, {0x109c, 0xa8}, {0x109d, 0x8a}, {0x109e, 0x01}, {0x109f, 0x25}, {0x10a0, 0x8d}, {0x10a1, 0xa3}, {0x10a2, 0x00}, {0x10a3, 0x00}, {0x10a4, 0x85}, {0x10a5, 0x6e}, {0x10a6, 0x00}, {0x10a7, 0x00}, {0x10a8, 0xa8}, {0x10a9, 0xea}, {0x10aa, 0x01}, {0x10ab, 0x3f}, {0x10ac, 0x8d}, {0x10ad, 0xe4}, {0x10ae, 0x00}, {0x10af, 0x00}, {0x10b0, 0x84}, {0x10b1, 0xab}, {0x10b2, 0x00}, {0x10b3, 0x08}, {0x10b4, 0xa8}, {0x10b5, 0x6a}, {0x10b6, 0x01}, {0x10b7, 0x26}, {0x10b8, 0x84}, {0x10b9, 0x8b}, {0x10ba, 0x00}, {0x10bb, 0x04}, {0x10bc, 0x8d}, {0x10bd, 0x83}, {0x10be, 0x00}, {0x10bf, 0x00}, {0x10c0, 0xe2}, {0x10c1, 0x25}, {0x10c2, 0x23}, {0x10c3, 0x06}, {0x10c4, 0xa9}, {0x10c5, 0x0a}, {0x10c6, 0x01}, {0x10c7, 0x2d}, {0x10c8, 0xa8}, {0x10c9, 0x6a}, {0x10ca, 0x01}, {0x10cb, 0x3c}, {0x10cc, 0x8c}, {0x10cd, 0x63}, {0x10ce, 0x00}, {0x10cf, 0x00}, {0x10d0, 0xb8}, {0x10d1, 0xc3}, {0x10d2, 0x00}, {0x10d3, 0x18}, {0x10d4, 0xa8}, {0x10d5, 0x8a}, {0x10d6, 0x01}, {0x10d7, 0x3d}, {0x10d8, 0xa8}, {0x10d9, 0xaa}, {0x10da, 0x01}, {0x10db, 0x3e}, {0x10dc, 0x8c}, {0x10dd, 0x84}, {0x10de, 0x00}, {0x10df, 0x00}, {0x10e0, 0xa9}, {0x10e1, 0x4d}, {0x10e2, 0x00}, {0x10e3, 0x00}, {0x10e4, 0x8c}, {0x10e5, 0xa5}, {0x10e6, 0x00}, {0x10e7, 0x00}, {0x10e8, 0xb8}, {0x10e9, 0x64}, {0x10ea, 0x00}, {0x10eb, 0x10}, {0x10ec, 0x8c}, {0x10ed, 0xe7}, {0x10ee, 0x00}, {0x10ef, 0x00}, {0x10f0, 0xb8}, {0x10f1, 0x85}, {0x10f2, 0x00}, {0x10f3, 0x08}, {0x10f4, 0xe0}, {0x10f5, 0x66}, {0x10f6, 0x18}, {0x10f7, 0x00}, {0x10f8, 0x8c}, {0x10f9, 0xa8}, {0x10fa, 0x00}, {0x10fb, 0x00}, {0x10fc, 0xe0}, {0x10fd, 0x63}, {0x10fe, 0x20}, {0x10ff, 0x00}, {0x1100, 0x8c}, {0x1101, 0xcb}, {0x1102, 0x00}, {0x1103, 0x1c}, {0x1104, 0xe0}, {0x1105, 0xe3}, {0x1106, 0x38}, {0x1107, 0x00}, {0x1108, 0xbc}, {0x1109, 0x05}, {0x110a, 0x00}, {0x110b, 0x00}, {0x110c, 0x10}, {0x110d, 0x00}, {0x110e, 0x00}, {0x110f, 0x1f}, {0x1110, 0xa8}, {0x1111, 0x8f}, {0x1112, 0x00}, {0x1113, 0x00}, {0x1114, 0xe0}, {0x1115, 0xac}, {0x1116, 0x78}, {0x1117, 0x00}, {0x1118, 0xe4}, {0x1119, 0x6f}, {0x111a, 0x60}, {0x111b, 0x00}, {0x111c, 0x10}, {0x111d, 0x00}, {0x111e, 0x00}, {0x111f, 0x52}, {0x1120, 0x9d}, {0x1121, 0x00}, {0x1122, 0x00}, {0x1123, 0x00}, {0x1124, 0xa4}, {0x1125, 0x66}, {0x1126, 0xff}, {0x1127, 0xff}, {0x1128, 0xe4}, {0x1129, 0x43}, {0x112a, 0x28}, {0x112b, 0x00}, {0x112c, 0x10}, {0x112d, 0x00}, {0x112e, 0x00}, {0x112f, 0x06}, {0x1130, 0xe4}, {0x1131, 0xb1}, {0x1132, 0x38}, {0x1133, 0x00}, {0x1134, 0xe4}, {0x1135, 0x83}, {0x1136, 0x40}, {0x1137, 0x00}, {0x1138, 0x0c}, {0x1139, 0x00}, {0x113a, 0x00}, {0x113b, 0x8a}, {0x113c, 0xbc}, {0x113d, 0x24}, {0x113e, 0x00}, {0x113f, 0x00}, {0x1140, 0xe4}, {0x1141, 0xb1}, {0x1142, 0x38}, {0x1143, 0x00}, {0x1144, 0x10}, {0x1145, 0x00}, {0x1146, 0x00}, {0x1147, 0x06}, {0x1148, 0x18}, {0x1149, 0x60}, {0x114a, 0x80}, {0x114b, 0x21}, {0x114c, 0xe4}, {0x114d, 0x66}, {0x114e, 0x50}, {0x114f, 0x00}, {0x1150, 0x0c}, {0x1151, 0x00}, {0x1152, 0x00}, {0x1153, 0x88}, {0x1154, 0x9c}, {0x1155, 0xe0}, {0x1156, 0xff}, {0x1157, 0x80}, {0x1158, 0x18}, {0x1159, 0x60}, {0x115a, 0x80}, {0x115b, 0x21}, {0x115c, 0xa8}, {0x115d, 0x83}, {0x115e, 0x00}, {0x115f, 0x83}, {0x1160, 0xa8}, {0x1161, 0xa3}, {0x1162, 0x01}, {0x1163, 0x9c}, {0x1164, 0x8c}, {0x1165, 0x64}, {0x1166, 0x00}, {0x1167, 0x00}, {0x1168, 0xa4}, {0x1169, 0x63}, {0x116a, 0x00}, {0x116b, 0x7f}, {0x116c, 0xd8}, {0x116d, 0x04}, {0x116e, 0x18}, {0x116f, 0x00}, {0x1170, 0x8c}, {0x1171, 0x65}, {0x1172, 0x00}, {0x1173, 0x00}, {0x1174, 0xa4}, {0x1175, 0x63}, {0x1176, 0x00}, {0x1177, 0xef}, {0x1178, 0xd8}, {0x1179, 0x05}, {0x117a, 0x18}, {0x117b, 0x00}, {0x117c, 0x18}, {0x117d, 0x60}, {0x117e, 0x80}, {0x117f, 0x80}, {0x1180, 0xa8}, {0x1181, 0x63}, {0x1182, 0x01}, {0x1183, 0x25}, {0x1184, 0xd8}, {0x1185, 0x03}, {0x1186, 0x30}, {0x1187, 0x00}, {0x1188, 0x84}, {0x1189, 0xce}, {0x118a, 0x00}, {0x118b, 0x00}, {0x118c, 0x8c}, {0x118d, 0x66}, {0x118e, 0x00}, {0x118f, 0x00}, {0x1190, 0xbc}, {0x1191, 0x23}, {0x1192, 0x00}, {0x1193, 0x01}, {0x1194, 0x0c}, {0x1195, 0x00}, {0x1196, 0x00}, {0x1197, 0x51}, {0x1198, 0x18}, {0x1199, 0x60}, {0x119a, 0x80}, {0x119b, 0x21}, {0x119c, 0xa8}, {0x119d, 0x83}, {0x119e, 0x11}, {0x119f, 0x0a}, {0x11a0, 0xa8}, {0x11a1, 0xa3}, {0x11a2, 0x11}, {0x11a3, 0x0b}, {0x11a4, 0x8c}, {0x11a5, 0x64}, {0x11a6, 0x00}, {0x11a7, 0x00}, {0x11a8, 0x8c}, {0x11a9, 0x85}, {0x11aa, 0x00}, {0x11ab, 0x00}, {0x11ac, 0xb8}, {0x11ad, 0x63}, {0x11ae, 0x00}, {0x11af, 0x08}, {0x11b0, 0xe0}, {0x11b1, 0x63}, {0x11b2, 0x20}, {0x11b3, 0x00}, {0x11b4, 0xd4}, {0x11b5, 0x06}, {0x11b6, 0x18}, {0x11b7, 0x08}, {0x11b8, 0x84}, {0x11b9, 0x6e}, {0x11ba, 0x00}, {0x11bb, 0x00}, {0x11bc, 0x84}, {0x11bd, 0x63}, {0x11be, 0x00}, {0x11bf, 0x08}, {0x11c0, 0xbc}, {0x11c1, 0x43}, {0x11c2, 0x00}, {0x11c3, 0x1e}, {0x11c4, 0x10}, {0x11c5, 0x00}, {0x11c6, 0x00}, {0x11c7, 0x12}, {0x11c8, 0xbc}, {0x11c9, 0x43}, {0x11ca, 0x00}, {0x11cb, 0x2e}, {0x11cc, 0x18}, {0x11cd, 0x60}, {0x11ce, 0x00}, {0x11cf, 0x14}, {0x11d0, 0xa8}, {0x11d1, 0x63}, {0x11d2, 0x10}, {0x11d3, 0x00}, {0x11d4, 0x8c}, {0x11d5, 0x83}, {0x11d6, 0x00}, {0x11d7, 0x00}, {0x11d8, 0x18}, {0x11d9, 0x60}, {0x11da, 0x00}, {0x11db, 0x14}, {0x11dc, 0xa8}, {0x11dd, 0x63}, {0x11de, 0x10}, {0x11df, 0x01}, {0x11e0, 0x8c}, {0x11e1, 0x63}, {0x11e2, 0x00}, {0x11e3, 0x00}, {0x11e4, 0xa8}, {0x11e5, 0xa4}, {0x11e6, 0x00}, {0x11e7, 0x00}, {0x11e8, 0xa8}, {0x11e9, 0x83}, {0x11ea, 0x00}, {0x11eb, 0x00}, {0x11ec, 0x18}, {0x11ed, 0x60}, {0x11ee, 0x80}, {0x11ef, 0x80}, {0x11f0, 0xa8}, {0x11f1, 0x63}, {0x11f2, 0x01}, {0x11f3, 0x2c}, {0x11f4, 0x8c}, {0x11f5, 0x63}, {0x11f6, 0x00}, {0x11f7, 0x00}, {0x11f8, 0xbc}, {0x11f9, 0x23}, {0x11fa, 0x00}, {0x11fb, 0x01}, {0x11fc, 0x10}, {0x11fd, 0x00}, {0x11fe, 0x00}, {0x11ff, 0x81}, {0x1200, 0x18}, {0x1201, 0x60}, {0x1202, 0x80}, {0x1203, 0x21}, {0x1204, 0x00}, {0x1205, 0x00}, {0x1206, 0x00}, {0x1207, 0x13}, {0x1208, 0xa8}, {0x1209, 0xc3}, {0x120a, 0x05}, {0x120b, 0x81}, {0x120c, 0x10}, {0x120d, 0x00}, {0x120e, 0x00}, {0x120f, 0x19}, {0x1210, 0xbc}, {0x1211, 0x43}, {0x1212, 0x00}, {0x1213, 0x3e}, {0x1214, 0x18}, {0x1215, 0x60}, {0x1216, 0x00}, {0x1217, 0x14}, {0x1218, 0xa8}, {0x1219, 0x63}, {0x121a, 0x10}, {0x121b, 0x02}, {0x121c, 0x8c}, {0x121d, 0x83}, {0x121e, 0x00}, {0x121f, 0x00}, {0x1220, 0x18}, {0x1221, 0x60}, {0x1222, 0x00}, {0x1223, 0x14}, {0x1224, 0xa8}, {0x1225, 0x63}, {0x1226, 0x10}, {0x1227, 0x03}, {0x1228, 0xa8}, {0x1229, 0xa4}, {0x122a, 0x00}, {0x122b, 0x00}, {0x122c, 0x8c}, {0x122d, 0x63}, {0x122e, 0x00}, {0x122f, 0x00}, {0x1230, 0xa8}, {0x1231, 0x83}, {0x1232, 0x00}, {0x1233, 0x00}, {0x1234, 0x18}, {0x1235, 0x60}, {0x1236, 0x80}, {0x1237, 0x80}, {0x1238, 0xa8}, {0x1239, 0x63}, {0x123a, 0x01}, {0x123b, 0x2c}, {0x123c, 0x8c}, {0x123d, 0x63}, {0x123e, 0x00}, {0x123f, 0x00}, {0x1240, 0xbc}, {0x1241, 0x23}, {0x1242, 0x00}, {0x1243, 0x01}, {0x1244, 0x10}, {0x1245, 0x00}, {0x1246, 0x00}, {0x1247, 0x6f}, {0x1248, 0x18}, {0x1249, 0x60}, {0x124a, 0x80}, {0x124b, 0x21}, {0x124c, 0xa8}, {0x124d, 0xc3}, {0x124e, 0x05}, {0x124f, 0x81}, {0x1250, 0xa8}, {0x1251, 0x63}, {0x1252, 0x05}, {0x1253, 0x82}, {0x1254, 0xd8}, {0x1255, 0x06}, {0x1256, 0x28}, {0x1257, 0x00}, {0x1258, 0xd8}, {0x1259, 0x03}, {0x125a, 0x20}, {0x125b, 0x00}, {0x125c, 0x00}, {0x125d, 0x00}, {0x125e, 0x00}, {0x125f, 0x69}, {0x1260, 0x15}, {0x1261, 0x00}, {0x1262, 0x00}, {0x1263, 0x00}, {0x1264, 0xe0}, {0x1265, 0x6f}, {0x1266, 0x60}, {0x1267, 0x02}, {0x1268, 0x03}, {0x1269, 0xff}, {0x126a, 0xff}, {0x126b, 0xaf}, {0x126c, 0xa5}, {0x126d, 0x03}, {0x126e, 0xff}, {0x126f, 0xff}, {0x1270, 0x0c}, {0x1271, 0x00}, {0x1272, 0x00}, {0x1273, 0x35}, {0x1274, 0xbc}, {0x1275, 0x43}, {0x1276, 0x00}, {0x1277, 0x4e}, {0x1278, 0x10}, {0x1279, 0x00}, {0x127a, 0x00}, {0x127b, 0x4e}, {0x127c, 0xbc}, {0x127d, 0x43}, {0x127e, 0x00}, {0x127f, 0x5e}, {0x1280, 0x18}, {0x1281, 0x60}, {0x1282, 0x00}, {0x1283, 0x14}, {0x1284, 0xa8}, {0x1285, 0x63}, {0x1286, 0x10}, {0x1287, 0x06}, {0x1288, 0x8c}, {0x1289, 0x83}, {0x128a, 0x00}, {0x128b, 0x00}, {0x128c, 0x18}, {0x128d, 0x60}, {0x128e, 0x00}, {0x128f, 0x14}, {0x1290, 0xa8}, {0x1291, 0x63}, {0x1292, 0x10}, {0x1293, 0x07}, {0x1294, 0x03}, {0x1295, 0xff}, {0x1296, 0xff}, {0x1297, 0xd3}, {0x1298, 0x15}, {0x1299, 0x00}, {0x129a, 0x00}, {0x129b, 0x00}, {0x129c, 0x0c}, {0x129d, 0x00}, {0x129e, 0x00}, {0x129f, 0x26}, {0x12a0, 0xbc}, {0x12a1, 0xa3}, {0x12a2, 0x00}, {0x12a3, 0x7f}, {0x12a4, 0x10}, {0x12a5, 0x00}, {0x12a6, 0x00}, {0x12a7, 0x3b}, {0x12a8, 0xbc}, {0x12a9, 0xa3}, {0x12aa, 0x00}, {0x12ab, 0x3f}, {0x12ac, 0x9c}, {0x12ad, 0x63}, {0x12ae, 0xff}, {0x12af, 0x80}, {0x12b0, 0xb8}, {0x12b1, 0x83}, {0x12b2, 0x00}, {0x12b3, 0x43}, {0x12b4, 0x03}, {0x12b5, 0xff}, {0x12b6, 0xff}, {0x12b7, 0x68}, {0x12b8, 0x9d}, {0x12b9, 0x84}, {0x12ba, 0x00}, {0x12bb, 0x70}, {0x12bc, 0x84}, {0x12bd, 0x8e}, {0x12be, 0x00}, {0x12bf, 0x00}, {0x12c0, 0x9c}, {0x12c1, 0x60}, {0x12c2, 0x32}, {0x12c3, 0x12}, {0x12c4, 0x8c}, {0x12c5, 0xa4}, {0x12c6, 0x00}, {0x12c7, 0x1f}, {0x12c8, 0x07}, {0x12c9, 0xfb}, {0x12ca, 0x22}, {0x12cb, 0xdc}, {0x12cc, 0x9c}, {0x12cd, 0x80}, {0x12ce, 0x00}, {0x12cf, 0x00}, {0x12d0, 0x03}, {0x12d1, 0xff}, {0x12d2, 0xff}, {0x12d3, 0x68}, {0x12d4, 0x84}, {0x12d5, 0x6e}, {0x12d6, 0x00}, {0x12d7, 0x00}, {0x12d8, 0x18}, {0x12d9, 0xa0}, {0x12da, 0x80}, {0x12db, 0x14}, {0x12dc, 0xa8}, {0x12dd, 0x65}, {0x12de, 0x00}, {0x12df, 0x2a}, {0x12e0, 0x8c}, {0x12e1, 0x63}, {0x12e2, 0x00}, {0x12e3, 0x00}, {0x12e4, 0xbc}, {0x12e5, 0xa3}, {0x12e6, 0x00}, {0x12e7, 0x07}, {0x12e8, 0x10}, {0x12e9, 0x00}, {0x12ea, 0x00}, {0x12eb, 0x0b}, {0x12ec, 0x18}, {0x12ed, 0x80}, {0x12ee, 0x80}, {0x12ef, 0x21}, {0x12f0, 0x18}, {0x12f1, 0x60}, {0x12f2, 0x80}, {0x12f3, 0x21}, {0x12f4, 0x9c}, {0x12f5, 0xa0}, {0x12f6, 0x00}, {0x12f7, 0x07}, {0x12f8, 0xa8}, {0x12f9, 0x83}, {0x12fa, 0x11}, {0x12fb, 0x0a}, {0x12fc, 0x9c}, {0x12fd, 0xe0}, {0x12fe, 0xff}, {0x12ff, 0xff}, {0x1300, 0xa8}, {0x1301, 0x63}, {0x1302, 0x11}, {0x1303, 0x0b}, {0x1304, 0xd8}, {0x1305, 0x04}, {0x1306, 0x28}, {0x1307, 0x00}, {0x1308, 0xd8}, {0x1309, 0x03}, {0x130a, 0x38}, {0x130b, 0x00}, {0x130c, 0x03}, {0x130d, 0xff}, {0x130e, 0xff}, {0x130f, 0xac}, {0x1310, 0x84}, {0x1311, 0x6e}, {0x1312, 0x00}, {0x1313, 0x00}, {0x1314, 0xa8}, {0x1315, 0xc5}, {0x1316, 0x00}, {0x1317, 0x2b}, {0x1318, 0xa8}, {0x1319, 0xa4}, {0x131a, 0x11}, {0x131b, 0x0a}, {0x131c, 0xd8}, {0x131d, 0x05}, {0x131e, 0x18}, {0x131f, 0x00}, {0x1320, 0xa8}, {0x1321, 0x84}, {0x1322, 0x11}, {0x1323, 0x0b}, {0x1324, 0x8c}, {0x1325, 0x66}, {0x1326, 0x00}, {0x1327, 0x00}, {0x1328, 0xd8}, {0x1329, 0x04}, {0x132a, 0x18}, {0x132b, 0x00}, {0x132c, 0x03}, {0x132d, 0xff}, {0x132e, 0xff}, {0x132f, 0xa4}, {0x1330, 0x84}, {0x1331, 0x6e}, {0x1332, 0x00}, {0x1333, 0x00}, {0x1334, 0x9c}, {0x1335, 0x63}, {0x1336, 0xff}, {0x1337, 0x00}, {0x1338, 0xb8}, {0x1339, 0x83}, {0x133a, 0x00}, {0x133b, 0x44}, {0x133c, 0x03}, {0x133d, 0xff}, {0x133e, 0xff}, {0x133f, 0x46}, {0x1340, 0x9d}, {0x1341, 0x84}, {0x1342, 0x00}, {0x1343, 0xf0}, {0x1344, 0x18}, {0x1345, 0x60}, {0x1346, 0x00}, {0x1347, 0x14}, {0x1348, 0xa8}, {0x1349, 0x63}, {0x134a, 0x10}, {0x134b, 0x04}, {0x134c, 0x8c}, {0x134d, 0x83}, {0x134e, 0x00}, {0x134f, 0x00}, {0x1350, 0x18}, {0x1351, 0x60}, {0x1352, 0x00}, {0x1353, 0x14}, {0x1354, 0xa8}, {0x1355, 0x63}, {0x1356, 0x10}, {0x1357, 0x05}, {0x1358, 0x03}, {0x1359, 0xff}, {0x135a, 0xff}, {0x135b, 0xa2}, {0x135c, 0x15}, {0x135d, 0x00}, {0x135e, 0x00}, {0x135f, 0x00}, {0x1360, 0x13}, {0x1361, 0xff}, {0x1362, 0xff}, {0x1363, 0x8a}, {0x1364, 0xe4}, {0x1365, 0xb1}, {0x1366, 0x38}, {0x1367, 0x00}, {0x1368, 0x03}, {0x1369, 0xff}, {0x136a, 0xff}, {0x136b, 0x77}, {0x136c, 0x15}, {0x136d, 0x00}, {0x136e, 0x00}, {0x136f, 0x00}, {0x1370, 0xa8}, {0x1371, 0x83}, {0x1372, 0x00}, {0x1373, 0x83}, {0x1374, 0xa8}, {0x1375, 0xa3}, {0x1376, 0x01}, {0x1377, 0x9c}, {0x1378, 0x8c}, {0x1379, 0x64}, {0x137a, 0x00}, {0x137b, 0x00}, {0x137c, 0xe0}, {0x137d, 0x63}, {0x137e, 0x38}, {0x137f, 0x04}, {0x1380, 0xd8}, {0x1381, 0x04}, {0x1382, 0x18}, {0x1383, 0x00}, {0x1384, 0x8c}, {0x1385, 0x65}, {0x1386, 0x00}, {0x1387, 0x00}, {0x1388, 0x03}, {0x1389, 0xff}, {0x138a, 0xff}, {0x138b, 0x7c}, {0x138c, 0xa8}, {0x138d, 0x63}, {0x138e, 0x00}, {0x138f, 0x10}, {0x1390, 0x0c}, {0x1391, 0x00}, {0x1392, 0x00}, {0x1393, 0x18}, {0x1394, 0xbc}, {0x1395, 0xa3}, {0x1396, 0x00}, {0x1397, 0x1f}, {0x1398, 0x13}, {0x1399, 0xff}, {0x139a, 0xff}, {0x139b, 0x2f}, {0x139c, 0x9d}, {0x139d, 0x83}, {0x139e, 0xff}, {0x139f, 0xf0}, {0x13a0, 0x9c}, {0x13a1, 0x63}, {0x13a2, 0xff}, {0x13a3, 0xe0}, {0x13a4, 0xb8}, {0x13a5, 0x83}, {0x13a6, 0x00}, {0x13a7, 0x41}, {0x13a8, 0x03}, {0x13a9, 0xff}, {0x13aa, 0xff}, {0x13ab, 0x2b}, {0x13ac, 0x9d}, {0x13ad, 0x84}, {0x13ae, 0x00}, {0x13af, 0x10}, {0x13b0, 0x10}, {0x13b1, 0x00}, {0x13b2, 0x00}, {0x13b3, 0x09}, {0x13b4, 0x15}, {0x13b5, 0x00}, {0x13b6, 0x00}, {0x13b7, 0x00}, {0x13b8, 0x18}, {0x13b9, 0x60}, {0x13ba, 0x00}, {0x13bb, 0x14}, {0x13bc, 0xa8}, {0x13bd, 0x63}, {0x13be, 0x10}, {0x13bf, 0x08}, {0x13c0, 0x8c}, {0x13c1, 0x83}, {0x13c2, 0x00}, {0x13c3, 0x00}, {0x13c4, 0x18}, {0x13c5, 0x60}, {0x13c6, 0x00}, {0x13c7, 0x14}, {0x13c8, 0xa8}, {0x13c9, 0x63}, {0x13ca, 0x10}, {0x13cb, 0x09}, {0x13cc, 0x03}, {0x13cd, 0xff}, {0x13ce, 0xff}, {0x13cf, 0x85}, {0x13d0, 0x15}, {0x13d1, 0x00}, {0x13d2, 0x00}, {0x13d3, 0x00}, {0x13d4, 0x18}, {0x13d5, 0x60}, {0x13d6, 0x00}, {0x13d7, 0x14}, {0x13d8, 0xa8}, {0x13d9, 0x63}, {0x13da, 0x10}, {0x13db, 0x0a}, {0x13dc, 0x8c}, {0x13dd, 0x83}, {0x13de, 0x00}, {0x13df, 0x00}, {0x13e0, 0x18}, {0x13e1, 0x60}, {0x13e2, 0x00}, {0x13e3, 0x14}, {0x13e4, 0xa8}, {0x13e5, 0x63}, {0x13e6, 0x10}, {0x13e7, 0x0b}, {0x13e8, 0x03}, {0x13e9, 0xff}, {0x13ea, 0xff}, {0x13eb, 0x7e}, {0x13ec, 0x15}, {0x13ed, 0x00}, {0x13ee, 0x00}, {0x13ef, 0x00}, {0x13f0, 0x9c}, {0x13f1, 0x63}, {0x13f2, 0xff}, {0x13f3, 0xc0}, {0x13f4, 0xb8}, {0x13f5, 0x83}, {0x13f6, 0x00}, {0x13f7, 0x42}, {0x13f8, 0x03}, {0x13f9, 0xff}, {0x13fa, 0xff}, {0x13fb, 0x17}, {0x13fc, 0x9d}, {0x13fd, 0x84}, {0x13fe, 0x00}, {0x13ff, 0x30}, {0x1400, 0x85}, {0x1401, 0x21}, {0x1402, 0x00}, {0x1403, 0x00}, {0x1404, 0x85}, {0x1405, 0x41}, {0x1406, 0x00}, {0x1407, 0x04}, {0x1408, 0x85}, {0x1409, 0x81}, {0x140a, 0x00}, {0x140b, 0x08}, {0x140c, 0x85}, {0x140d, 0xc1}, {0x140e, 0x00}, {0x140f, 0x0c}, {0x1410, 0x44}, {0x1411, 0x00}, {0x1412, 0x48}, {0x1413, 0x00}, {0x1414, 0x9c}, {0x1415, 0x21}, {0x1416, 0x00}, {0x1417, 0x10}, {0x1418, 0x9c}, {0x1419, 0x21}, {0x141a, 0xff}, {0x141b, 0xec}, {0x141c, 0x18}, {0x141d, 0x80}, {0x141e, 0x80}, {0x141f, 0x80}, {0x1420, 0x18}, {0x1421, 0x60}, {0x1422, 0x00}, {0x1423, 0x14}, {0x1424, 0xa8}, {0x1425, 0x63}, {0x1426, 0x00}, {0x1427, 0x9c}, {0x1428, 0xa8}, {0x1429, 0xc4}, {0x142a, 0x01}, {0x142b, 0x38}, {0x142c, 0x84}, {0x142d, 0xa3}, {0x142e, 0x00}, {0x142f, 0x00}, {0x1430, 0xa9}, {0x1431, 0x04}, {0x1432, 0x01}, {0x1433, 0x3b}, {0x1434, 0x8c}, {0x1435, 0x66}, {0x1436, 0x00}, {0x1437, 0x00}, {0x1438, 0x84}, {0x1439, 0xe5}, {0x143a, 0x00}, {0x143b, 0x04}, {0x143c, 0xe0}, {0x143d, 0xe7}, {0x143e, 0x1b}, {0x143f, 0x06}, {0x1440, 0xa8}, {0x1441, 0xc4}, {0x1442, 0x01}, {0x1443, 0x39}, {0x1444, 0x8c}, {0x1445, 0x66}, {0x1446, 0x00}, {0x1447, 0x00}, {0x1448, 0xa8}, {0x1449, 0xc4}, {0x144a, 0x01}, {0x144b, 0x3a}, {0x144c, 0xa8}, {0x144d, 0x83}, {0x144e, 0x00}, {0x144f, 0x00}, {0x1450, 0x8c}, {0x1451, 0xc6}, {0x1452, 0x00}, {0x1453, 0x00}, {0x1454, 0x18}, {0x1455, 0x60}, {0x1456, 0x80}, {0x1457, 0x21}, {0x1458, 0xa9}, {0x1459, 0x63}, {0x145a, 0x00}, {0x145b, 0x98}, {0x145c, 0xa9}, {0x145d, 0xa3}, {0x145e, 0x00}, {0x145f, 0x99}, {0x1460, 0xa9}, {0x1461, 0xe3}, {0x1462, 0x00}, {0x1463, 0x9a}, {0x1464, 0xaa}, {0x1465, 0x23}, {0x1466, 0x00}, {0x1467, 0x9b}, {0x1468, 0xaa}, {0x1469, 0x63}, {0x146a, 0x00}, {0x146b, 0x9c}, {0x146c, 0xaa}, {0x146d, 0xa3}, {0x146e, 0x00}, {0x146f, 0x9d}, {0x1470, 0xb8}, {0x1471, 0x67}, {0x1472, 0x00}, {0x1473, 0x47}, {0x1474, 0xd4}, {0x1475, 0x01}, {0x1476, 0x18}, {0x1477, 0x00}, {0x1478, 0x84}, {0x1479, 0x65}, {0x147a, 0x00}, {0x147b, 0x08}, {0x147c, 0xe0}, {0x147d, 0x63}, {0x147e, 0x23}, {0x147f, 0x06}, {0x1480, 0xb8}, {0x1481, 0x63}, {0x1482, 0x00}, {0x1483, 0x47}, {0x1484, 0xd4}, {0x1485, 0x01}, {0x1486, 0x18}, {0x1487, 0x04}, {0x1488, 0x84}, {0x1489, 0x65}, {0x148a, 0x00}, {0x148b, 0x0c}, {0x148c, 0xe0}, {0x148d, 0x63}, {0x148e, 0x23}, {0x148f, 0x06}, {0x1490, 0xb8}, {0x1491, 0x63}, {0x1492, 0x00}, {0x1493, 0x47}, {0x1494, 0xd4}, {0x1495, 0x01}, {0x1496, 0x18}, {0x1497, 0x08}, {0x1498, 0x84}, {0x1499, 0x65}, {0x149a, 0x00}, {0x149b, 0x10}, {0x149c, 0xe0}, {0x149d, 0x63}, {0x149e, 0x33}, {0x149f, 0x06}, {0x14a0, 0xb8}, {0x14a1, 0x83}, {0x14a2, 0x00}, {0x14a3, 0x47}, {0x14a4, 0xb8}, {0x14a5, 0xa3}, {0x14a6, 0x00}, {0x14a7, 0x4f}, {0x14a8, 0xd4}, {0x14a9, 0x01}, {0x14aa, 0x20}, {0x14ab, 0x0c}, {0x14ac, 0x8c}, {0x14ad, 0x68}, {0x14ae, 0x00}, {0x14af, 0x00}, {0x14b0, 0xbc}, {0x14b1, 0x03}, {0x14b2, 0x00}, {0x14b3, 0x00}, {0x14b4, 0x10}, {0x14b5, 0x00}, {0x14b6, 0x00}, {0x14b7, 0x1d}, {0x14b8, 0xa4}, {0x14b9, 0x65}, {0x14ba, 0x00}, {0x14bb, 0xff}, {0x14bc, 0xd8}, {0x14bd, 0x01}, {0x14be, 0x20}, {0x14bf, 0x10}, {0x14c0, 0xd8}, {0x14c1, 0x0b}, {0x14c2, 0x18}, {0x14c3, 0x00}, {0x14c4, 0x8c}, {0x14c5, 0x61}, {0x14c6, 0x00}, {0x14c7, 0x10}, {0x14c8, 0xd8}, {0x14c9, 0x0d}, {0x14ca, 0x18}, {0x14cb, 0x00}, {0x14cc, 0x84}, {0x14cd, 0x61}, {0x14ce, 0x00}, {0x14cf, 0x04}, {0x14d0, 0x8c}, {0x14d1, 0xe1}, {0x14d2, 0x00}, {0x14d3, 0x06}, {0x14d4, 0xa4}, {0x14d5, 0xc3}, {0x14d6, 0x00}, {0x14d7, 0xff}, {0x14d8, 0x84}, {0x14d9, 0x61}, {0x14da, 0x00}, {0x14db, 0x08}, {0x14dc, 0x8c}, {0x14dd, 0xa1}, {0x14de, 0x00}, {0x14df, 0x0a}, {0x14e0, 0xa4}, {0x14e1, 0x83}, {0x14e2, 0x00}, {0x14e3, 0xff}, {0x14e4, 0xe0}, {0x14e5, 0x67}, {0x14e6, 0x28}, {0x14e7, 0x00}, {0x14e8, 0xe0}, {0x14e9, 0x86}, {0x14ea, 0x20}, {0x14eb, 0x00}, {0x14ec, 0xb8}, {0x14ed, 0x63}, {0x14ee, 0x00}, {0x14ef, 0x41}, {0x14f0, 0xb8}, {0x14f1, 0x84}, {0x14f2, 0x00}, {0x14f3, 0x41}, {0x14f4, 0xa4}, {0x14f5, 0x63}, {0x14f6, 0x00}, {0x14f7, 0xff}, {0x14f8, 0xd8}, {0x14f9, 0x01}, {0x14fa, 0x20}, {0x14fb, 0x10}, {0x14fc, 0xd8}, {0x14fd, 0x0f}, {0x14fe, 0x18}, {0x14ff, 0x00}, {0x1500, 0x8c}, {0x1501, 0x61}, {0x1502, 0x00}, {0x1503, 0x10}, {0x1504, 0xd8}, {0x1505, 0x11}, {0x1506, 0x18}, {0x1507, 0x00}, {0x1508, 0x84}, {0x1509, 0x81}, {0x150a, 0x00}, {0x150b, 0x00}, {0x150c, 0xb8}, {0x150d, 0x64}, {0x150e, 0x00}, {0x150f, 0x48}, {0x1510, 0xd8}, {0x1511, 0x01}, {0x1512, 0x20}, {0x1513, 0x10}, {0x1514, 0xd8}, {0x1515, 0x01}, {0x1516, 0x18}, {0x1517, 0x11}, {0x1518, 0xa4}, {0x1519, 0x63}, {0x151a, 0x00}, {0x151b, 0xff}, {0x151c, 0xd8}, {0x151d, 0x13}, {0x151e, 0x18}, {0x151f, 0x00}, {0x1520, 0x8c}, {0x1521, 0x61}, {0x1522, 0x00}, {0x1523, 0x10}, {0x1524, 0xd8}, {0x1525, 0x15}, {0x1526, 0x18}, {0x1527, 0x00}, {0x1528, 0x44}, {0x1529, 0x00}, {0x152a, 0x48}, {0x152b, 0x00}, {0x152c, 0x9c}, {0x152d, 0x21}, {0x152e, 0x00}, {0x152f, 0x14}, {0x1530, 0x9c}, {0x1531, 0x21}, {0x1532, 0xff}, {0x1533, 0xe0}, {0x1534, 0xd4}, {0x1535, 0x01}, {0x1536, 0x48}, {0x1537, 0x00}, {0x1538, 0xd4}, {0x1539, 0x01}, {0x153a, 0x50}, {0x153b, 0x04}, {0x153c, 0xd4}, {0x153d, 0x01}, {0x153e, 0x60}, {0x153f, 0x08}, {0x1540, 0xd4}, {0x1541, 0x01}, {0x1542, 0x70}, {0x1543, 0x0c}, {0x1544, 0xd4}, {0x1545, 0x01}, {0x1546, 0x80}, {0x1547, 0x10}, {0x1548, 0xd4}, {0x1549, 0x01}, {0x154a, 0x90}, {0x154b, 0x14}, {0x154c, 0xd4}, {0x154d, 0x01}, {0x154e, 0xa0}, {0x154f, 0x18}, {0x1550, 0x1a}, {0x1551, 0x40}, {0x1552, 0x00}, {0x1553, 0x14}, {0x1554, 0xaa}, {0x1555, 0x52}, {0x1556, 0x00}, {0x1557, 0x18}, {0x1558, 0x84}, {0x1559, 0x72}, {0x155a, 0x00}, {0x155b, 0x00}, {0x155c, 0x07}, {0x155d, 0xfb}, {0x155e, 0x02}, {0x155f, 0x1d}, {0x1560, 0x86}, {0x1561, 0x03}, {0x1562, 0x00}, {0x1563, 0x04}, {0x1564, 0x07}, {0x1565, 0xfb}, {0x1566, 0x02}, {0x1567, 0x65}, {0x1568, 0xa8}, {0x1569, 0x6b}, {0x156a, 0x00}, {0x156b, 0x00}, {0x156c, 0xbc}, {0x156d, 0x0b}, {0x156e, 0x00}, {0x156f, 0x00}, {0x1570, 0x10}, {0x1571, 0x00}, {0x1572, 0x00}, {0x1573, 0x1d}, {0x1574, 0xb8}, {0x1575, 0x70}, {0x1576, 0x00}, {0x1577, 0x50}, {0x1578, 0x84}, {0x1579, 0x92}, {0x157a, 0x00}, {0x157b, 0x00}, {0x157c, 0x8c}, {0x157d, 0x64}, {0x157e, 0x00}, {0x157f, 0x67}, {0x1580, 0xbc}, {0x1581, 0x23}, {0x1582, 0x00}, {0x1583, 0x01}, {0x1584, 0x0c}, {0x1585, 0x00}, {0x1586, 0x00}, {0x1587, 0x71}, {0x1588, 0x15}, {0x1589, 0x00}, {0x158a, 0x00}, {0x158b, 0x00}, {0x158c, 0xb8}, {0x158d, 0x6b}, {0x158e, 0x00}, {0x158f, 0x48}, {0x1590, 0xd8}, {0x1591, 0x01}, {0x1592, 0x58}, {0x1593, 0x1d}, {0x1594, 0x9d}, {0x1595, 0x40}, {0x1596, 0x00}, {0x1597, 0x00}, {0x1598, 0xd8}, {0x1599, 0x01}, {0x159a, 0x18}, {0x159b, 0x1c}, {0x159c, 0x84}, {0x159d, 0xb2}, {0x159e, 0x00}, {0x159f, 0x00}, {0x15a0, 0xe1}, {0x15a1, 0x8a}, {0x15a2, 0x50}, {0x15a3, 0x00}, {0x15a4, 0xe0}, {0x15a5, 0xcc}, {0x15a6, 0x28}, {0x15a7, 0x00}, {0x15a8, 0x94}, {0x15a9, 0x66}, {0x15aa, 0x00}, {0x15ab, 0x38}, {0x15ac, 0xa4}, {0x15ad, 0x83}, {0x15ae, 0xff}, {0x15af, 0xff}, {0x15b0, 0xbc}, {0x15b1, 0x24}, {0x15b2, 0x00}, {0x15b3, 0x00}, {0x15b4, 0x10}, {0x15b5, 0x00}, {0x15b6, 0x00}, {0x15b7, 0x3d}, {0x15b8, 0x9e}, {0x15b9, 0x81}, {0x15ba, 0x00}, {0x15bb, 0x1c}, {0x15bc, 0x9d}, {0x15bd, 0x4a}, {0x15be, 0x00}, {0x15bf, 0x01}, {0x15c0, 0xbd}, {0x15c1, 0x4a}, {0x15c2, 0x00}, {0x15c3, 0x01}, {0x15c4, 0x0f}, {0x15c5, 0xff}, {0x15c6, 0xff}, {0x15c7, 0xf6}, {0x15c8, 0x15}, {0x15c9, 0x00}, {0x15ca, 0x00}, {0x15cb, 0x00}, {0x15cc, 0x84}, {0x15cd, 0x92}, {0x15ce, 0x00}, {0x15cf, 0x00}, {0x15d0, 0x8c}, {0x15d1, 0x64}, {0x15d2, 0x00}, {0x15d3, 0x5f}, {0x15d4, 0xbc}, {0x15d5, 0x23}, {0x15d6, 0x00}, {0x15d7, 0x01}, {0x15d8, 0x0c}, {0x15d9, 0x00}, {0x15da, 0x00}, {0x15db, 0x58}, {0x15dc, 0x15}, {0x15dd, 0x00}, {0x15de, 0x00}, {0x15df, 0x00}, {0x15e0, 0xb8}, {0x15e1, 0x70}, {0x15e2, 0x00}, {0x15e3, 0x50}, {0x15e4, 0xb8}, {0x15e5, 0x90}, {0x15e6, 0x00}, {0x15e7, 0x48}, {0x15e8, 0xd8}, {0x15e9, 0x01}, {0x15ea, 0x80}, {0x15eb, 0x1e}, {0x15ec, 0xd8}, {0x15ed, 0x01}, {0x15ee, 0x18}, {0x15ef, 0x1c}, {0x15f0, 0xd8}, {0x15f1, 0x01}, {0x15f2, 0x20}, {0x15f3, 0x1d}, {0x15f4, 0x9d}, {0x15f5, 0x40}, {0x15f6, 0x00}, {0x15f7, 0x00}, {0x15f8, 0x84}, {0x15f9, 0xb2}, {0x15fa, 0x00}, {0x15fb, 0x00}, {0x15fc, 0xe1}, {0x15fd, 0x8a}, {0x15fe, 0x50}, {0x15ff, 0x00}, {0x1600, 0xe0}, {0x1601, 0xcc}, {0x1602, 0x28}, {0x1603, 0x00}, {0x1604, 0x94}, {0x1605, 0x66}, {0x1606, 0x00}, {0x1607, 0x28}, {0x1608, 0xa4}, {0x1609, 0x83}, {0x160a, 0xff}, {0x160b, 0xff}, {0x160c, 0xbc}, {0x160d, 0x24}, {0x160e, 0x00}, {0x160f, 0x00}, {0x1610, 0x10}, {0x1611, 0x00}, {0x1612, 0x00}, {0x1613, 0x0d}, {0x1614, 0x9e}, {0x1615, 0x81}, {0x1616, 0x00}, {0x1617, 0x1c}, {0x1618, 0x9d}, {0x1619, 0x4a}, {0x161a, 0x00}, {0x161b, 0x01}, {0x161c, 0xbd}, {0x161d, 0x4a}, {0x161e, 0x00}, {0x161f, 0x02}, {0x1620, 0x0f}, {0x1621, 0xff}, {0x1622, 0xff}, {0x1623, 0xf6}, {0x1624, 0x18}, {0x1625, 0x60}, {0x1626, 0x80}, {0x1627, 0x80}, {0x1628, 0xa8}, {0x1629, 0x63}, {0x162a, 0x01}, {0x162b, 0x04}, {0x162c, 0x8c}, {0x162d, 0x63}, {0x162e, 0x00}, {0x162f, 0x00}, {0x1630, 0xbc}, {0x1631, 0x03}, {0x1632, 0x00}, {0x1633, 0x00}, {0x1634, 0x10}, {0x1635, 0x00}, {0x1636, 0x00}, {0x1637, 0x48}, {0x1638, 0x15}, {0x1639, 0x00}, {0x163a, 0x00}, {0x163b, 0x00}, {0x163c, 0x00}, {0x163d, 0x00}, {0x163e, 0x00}, {0x163f, 0x34}, {0x1640, 0x84}, {0x1641, 0x92}, {0x1642, 0x00}, {0x1643, 0x00}, {0x1644, 0xbc}, {0x1645, 0x04}, {0x1646, 0x00}, {0x1647, 0xff}, {0x1648, 0x10}, {0x1649, 0x00}, {0x164a, 0x00}, {0x164b, 0x10}, {0x164c, 0xac}, {0x164d, 0xe3}, {0x164e, 0x00}, {0x164f, 0xff}, {0x1650, 0xe1}, {0x1651, 0xd4}, {0x1652, 0x50}, {0x1653, 0x00}, {0x1654, 0x8c}, {0x1655, 0x6e}, {0x1656, 0x00}, {0x1657, 0x00}, {0x1658, 0xe0}, {0x1659, 0x63}, {0x165a, 0x38}, {0x165b, 0x03}, {0x165c, 0xd8}, {0x165d, 0x0e}, {0x165e, 0x18}, {0x165f, 0x00}, {0x1660, 0x8c}, {0x1661, 0x85}, {0x1662, 0x00}, {0x1663, 0x1f}, {0x1664, 0x07}, {0x1665, 0xfb}, {0x1666, 0x23}, {0x1667, 0xb4}, {0x1668, 0x94}, {0x1669, 0x66}, {0x166a, 0x00}, {0x166b, 0x20}, {0x166c, 0x84}, {0x166d, 0xb2}, {0x166e, 0x00}, {0x166f, 0x00}, {0x1670, 0x8c}, {0x1671, 0x8e}, {0x1672, 0x00}, {0x1673, 0x00}, {0x1674, 0xe0}, {0x1675, 0x6c}, {0x1676, 0x28}, {0x1677, 0x00}, {0x1678, 0x8c}, {0x1679, 0x63}, {0x167a, 0x00}, {0x167b, 0x29}, {0x167c, 0xe1}, {0x167d, 0x6b}, {0x167e, 0x18}, {0x167f, 0x03}, {0x1680, 0xe1}, {0x1681, 0x64}, {0x1682, 0x58}, {0x1683, 0x04}, {0x1684, 0xd8}, {0x1685, 0x0e}, {0x1686, 0x58}, {0x1687, 0x00}, {0x1688, 0xe0}, {0x1689, 0x6c}, {0x168a, 0x28}, {0x168b, 0x00}, {0x168c, 0xe0}, {0x168d, 0x94}, {0x168e, 0x50}, {0x168f, 0x00}, {0x1690, 0x94}, {0x1691, 0x63}, {0x1692, 0x00}, {0x1693, 0x20}, {0x1694, 0x8c}, {0x1695, 0x84}, {0x1696, 0x00}, {0x1697, 0x00}, {0x1698, 0x07}, {0x1699, 0xfb}, {0x169a, 0x21}, {0x169b, 0xe8}, {0x169c, 0x8c}, {0x169d, 0xa5}, {0x169e, 0x00}, {0x169f, 0x1f}, {0x16a0, 0x03}, {0x16a1, 0xff}, {0x16a2, 0xff}, {0x16a3, 0xdf}, {0x16a4, 0x9d}, {0x16a5, 0x4a}, {0x16a6, 0x00}, {0x16a7, 0x01}, {0x16a8, 0xbc}, {0x16a9, 0x04}, {0x16aa, 0x00}, {0x16ab, 0xff}, {0x16ac, 0x10}, {0x16ad, 0x00}, {0x16ae, 0x00}, {0x16af, 0x10}, {0x16b0, 0xac}, {0x16b1, 0xe3}, {0x16b2, 0x00}, {0x16b3, 0xff}, {0x16b4, 0xe1}, {0x16b5, 0xd4}, {0x16b6, 0x50}, {0x16b7, 0x00}, {0x16b8, 0x8c}, {0x16b9, 0x6e}, {0x16ba, 0x00}, {0x16bb, 0x00}, {0x16bc, 0xe0}, {0x16bd, 0x63}, {0x16be, 0x38}, {0x16bf, 0x03}, {0x16c0, 0xd8}, {0x16c1, 0x0e}, {0x16c2, 0x18}, {0x16c3, 0x00}, {0x16c4, 0x8c}, {0x16c5, 0x85}, {0x16c6, 0x00}, {0x16c7, 0x1f}, {0x16c8, 0x07}, {0x16c9, 0xfb}, {0x16ca, 0x23}, {0x16cb, 0x9b}, {0x16cc, 0x94}, {0x16cd, 0x66}, {0x16ce, 0x00}, {0x16cf, 0x30}, {0x16d0, 0x84}, {0x16d1, 0xb2}, {0x16d2, 0x00}, {0x16d3, 0x00}, {0x16d4, 0x8c}, {0x16d5, 0x8e}, {0x16d6, 0x00}, {0x16d7, 0x00}, {0x16d8, 0xe0}, {0x16d9, 0x6c}, {0x16da, 0x28}, {0x16db, 0x00}, {0x16dc, 0x8c}, {0x16dd, 0x63}, {0x16de, 0x00}, {0x16df, 0x39}, {0x16e0, 0xe1}, {0x16e1, 0x6b}, {0x16e2, 0x18}, {0x16e3, 0x03}, {0x16e4, 0xe1}, {0x16e5, 0x64}, {0x16e6, 0x58}, {0x16e7, 0x04}, {0x16e8, 0xd8}, {0x16e9, 0x0e}, {0x16ea, 0x58}, {0x16eb, 0x00}, {0x16ec, 0xe0}, {0x16ed, 0x6c}, {0x16ee, 0x28}, {0x16ef, 0x00}, {0x16f0, 0xe0}, {0x16f1, 0x94}, {0x16f2, 0x50}, {0x16f3, 0x00}, {0x16f4, 0x94}, {0x16f5, 0x63}, {0x16f6, 0x00}, {0x16f7, 0x30}, {0x16f8, 0x8c}, {0x16f9, 0x84}, {0x16fa, 0x00}, {0x16fb, 0x00}, {0x16fc, 0x07}, {0x16fd, 0xfb}, {0x16fe, 0x21}, {0x16ff, 0xcf}, {0x1700, 0x8c}, {0x1701, 0xa5}, {0x1702, 0x00}, {0x1703, 0x1f}, {0x1704, 0x03}, {0x1705, 0xff}, {0x1706, 0xff}, {0x1707, 0xaf}, {0x1708, 0x9d}, {0x1709, 0x4a}, {0x170a, 0x00}, {0x170b, 0x01}, {0x170c, 0x9c}, {0x170d, 0x60}, {0x170e, 0x32}, {0x170f, 0x12}, {0x1710, 0x8c}, {0x1711, 0xa4}, {0x1712, 0x00}, {0x1713, 0x1f}, {0x1714, 0x07}, {0x1715, 0xfb}, {0x1716, 0x21}, {0x1717, 0xc9}, {0x1718, 0x9c}, {0x1719, 0x80}, {0x171a, 0x00}, {0x171b, 0x10}, {0x171c, 0x84}, {0x171d, 0x92}, {0x171e, 0x00}, {0x171f, 0x00}, {0x1720, 0x9c}, {0x1721, 0x60}, {0x1722, 0x32}, {0x1723, 0x12}, {0x1724, 0x8c}, {0x1725, 0xa4}, {0x1726, 0x00}, {0x1727, 0x1f}, {0x1728, 0x07}, {0x1729, 0xfb}, {0x172a, 0x21}, {0x172b, 0xc4}, {0x172c, 0x9c}, {0x172d, 0x80}, {0x172e, 0x00}, {0x172f, 0xa0}, {0x1730, 0x00}, {0x1731, 0x00}, {0x1732, 0x00}, {0x1733, 0x09}, {0x1734, 0x15}, {0x1735, 0x00}, {0x1736, 0x00}, {0x1737, 0x00}, {0x1738, 0x8c}, {0x1739, 0xa4}, {0x173a, 0x00}, {0x173b, 0x7b}, {0x173c, 0x94}, {0x173d, 0x64}, {0x173e, 0x00}, {0x173f, 0x5a}, {0x1740, 0x03}, {0x1741, 0xff}, {0x1742, 0xff}, {0x1743, 0xa8}, {0x1744, 0xe2}, {0x1745, 0x03}, {0x1746, 0x28}, {0x1747, 0x02}, {0x1748, 0x94}, {0x1749, 0x64}, {0x174a, 0x00}, {0x174b, 0x5a}, {0x174c, 0x03}, {0x174d, 0xff}, {0x174e, 0xff}, {0x174f, 0x90}, {0x1750, 0xe1}, {0x1751, 0x6b}, {0x1752, 0x18}, {0x1753, 0x00}, {0x1754, 0x85}, {0x1755, 0x21}, {0x1756, 0x00}, {0x1757, 0x00}, {0x1758, 0x85}, {0x1759, 0x41}, {0x175a, 0x00}, {0x175b, 0x04}, {0x175c, 0x85}, {0x175d, 0x81}, {0x175e, 0x00}, {0x175f, 0x08}, {0x1760, 0x85}, {0x1761, 0xc1}, {0x1762, 0x00}, {0x1763, 0x0c}, {0x1764, 0x86}, {0x1765, 0x01}, {0x1766, 0x00}, {0x1767, 0x10}, {0x1768, 0x86}, {0x1769, 0x41}, {0x176a, 0x00}, {0x176b, 0x14}, {0x176c, 0x86}, {0x176d, 0x81}, {0x176e, 0x00}, {0x176f, 0x18}, {0x1770, 0x44}, {0x1771, 0x00}, {0x1772, 0x48}, {0x1773, 0x00}, {0x1774, 0x9c}, {0x1775, 0x21}, {0x1776, 0x00}, {0x1777, 0x20}, {0xfffe, 0x14}, {0x1ff4, 0x00}, {0x1ff5, 0x00}, {0x1ff6, 0x00}, {0x1ff7, 0x03}, {0x1f84, 0x00}, /*patch address */ {0x1f85, 0x14}, {0x1f86, 0x15}, {0x1f87, 0x30}, {0x1f88, 0x00}, /*patch address */ {0x1f89, 0x14}, {0x1f8a, 0x10}, {0x1f8b, 0x0c}, {0xfffe, 0x80}, {0x000e, 0x54}, {0xfffe, 0x14}, {0x1f04, 0x7f}, {0x1f05, 0xff}, {0x1f06, 0xff}, {0x1f07, 0xff}, {0x1f08, 0x7f}, {0x1f09, 0xff}, {0x1f0a, 0xff}, {0x1f0b, 0xff}, {0x1f0c, 0x7f}, {0x1f0d, 0xff}, {0x1f0e, 0xff}, {0x1f0f, 0xff}, {0x1f10, 0x7f}, {0x1f11, 0xff}, {0x1f12, 0xff}, {0x1f13, 0xff}, {0x1f14, 0x7f}, {0x1f15, 0xff}, {0x1f16, 0xff}, {0x1f17, 0xff}, {0x1f18, 0x7f}, {0x1f19, 0xff}, {0x1f1a, 0xff}, {0x1f1b, 0xff}, {0x1f3c, 0x00}, /* patch jump address */ {0x1f3d, 0x14}, {0x1f3e, 0x14}, {0x1f3f, 0x18}, {0x1ff0, 0x00}, {0x1ff1, 0x00}, {0x1ff2, 0x40}, {0x1ff3, 0x00}, /*compare with old patch */ {0xfffe, 0x80}, {0x0138, 0x80}, /* blue gain */ {0x0139, 0x80}, /*green gain */ {0x013a, 0x80}, /* red gain */ {0x0104, 0x01}, /*group write enable */ {0x000f, 0x54}, /*patch turn on/off */ {0xfffe, 0x80}, {0x012d, 0x00}, {0x013c, 0x00}, {0x013d, 0x00}, {0x013e, 0x31}, {0x013f, 0x10}, {0x0124, 0x40}, {0x0126, 0x02}, {0xfffe, 0x14}, /*saturation setting */ {0x1000, 0x40}, /*sat_u1(gain<1f) */ {0x1001, 0x44}, /*sat_v2 */ {0x1002, 0x40}, /*sat_u2(gain<2f) */ {0x1003, 0x44}, /*sat_v2 */ {0x1004, 0x38}, /*sat_u3(gain<3f) */ {0x1005, 0x3c}, /*sat_v3 */ {0x1006, 0x38}, /*sat_u4(gain<4f) */ {0x1007, 0x3c}, /*sat_v4 */ {0x1008, 0x30}, /*sat_u5(gain<5f) */ {0x1009, 0x34}, /*sat_v5 */ {0x100a, 0x30}, {0x100b, 0x34}, {0xfffe, 0x80}, {0x012c, 0x01}, /*auto saturation */ {0xfffe, 0x14}, {0x0070, 0x00}, {0x0002, 0x01}, {0x0060, 0x35}, {0x0061, 0x0b}, {0x0062, 0x35}, {0x0063, 0x0a}, {0xfffd, 0x80}, {0xfffe, 0x21}, {0x0680, 0x00}, {0x0681, 0x00}, {0x0682, 0x00}, {0x0683, 0x00}, {0x0684, 0x07}, {0x0685, 0x80}, {0x0686, 0x04}, {0x0687, 0x38}, {0x0688, 0x11}, {0x0689, 0x11}, {0x068a, 0x42}, {0x068b, 0x24}, {0x068c, 0x44}, {0x068d, 0x44}, {0x068e, 0x42}, {0x068f, 0x24}, {0x0690, 0x03}, {0xfffd, 0x80}, {0xfffe, 0x21}, {0x0000, 0x47}, /*ISP function */ {0xfffe, 0x21}, /*LENC start */ {0x0800, 0x0f}, {0x0801, 0x08}, {0x0802, 0x07}, {0x0803, 0x07}, {0x0804, 0x0a}, {0x0805, 0x13}, {0x0806, 0x04}, {0x0807, 0x03}, {0x0808, 0x02}, {0x0809, 0x02}, {0x080a, 0x03}, {0x080b, 0x05}, {0x080c, 0x02}, {0x080d, 0x01}, {0x080e, 0x00}, {0x080f, 0x00}, {0x0810, 0x01}, {0x0811, 0x03}, {0x0812, 0x03}, {0x0813, 0x01}, {0x0814, 0x00}, {0x0815, 0x00}, {0x0816, 0x01}, {0x0817, 0x04}, {0x0818, 0x02}, {0x0819, 0x02}, {0x081a, 0x02}, {0x081b, 0x03}, {0x081c, 0x03}, {0x081d, 0x04}, {0x081e, 0x26}, {0x081f, 0x0f}, {0x0820, 0x0a}, {0x0821, 0x09}, {0x0822, 0x0d}, {0x0823, 0x25}, {0x0824, 0x11}, {0x0825, 0x21}, {0x0826, 0x32}, {0x0827, 0x31}, {0x0828, 0x20}, {0x082a, 0x30}, {0x082b, 0x30}, {0x082c, 0x30}, {0x082d, 0x30}, {0x082e, 0x30}, {0x0830, 0x31}, {0x0831, 0x41}, {0x0832, 0x41}, {0x0833, 0x41}, {0x0834, 0x30}, {0x0836, 0x41}, {0x0837, 0x41}, {0x0838, 0x42}, {0x0839, 0x31}, {0x083a, 0x40}, {0x083c, 0xff}, {0x083d, 0xff}, {0x083e, 0xff}, {0x083f, 0xff}, {0x0840, 0xff}, {0x0848, 0xcf}, {0x084a, 0x89}, {0x084d, 0x00}, {0x084e, 0xCC}, {0x084f, 0x01}, {0x0850, 0x6C}, {0x0851, 0x01}, {0x0852, 0x11}, {0x0853, 0x00}, {0x0854, 0xF2}, /*LENC end */ {0xfffd, 0x80}, {0xfffe, 0x14}, {0x02b3, 0x01}, /*AWB manual enable */ {0x02b6, 0x06}, /*init B gain */ {0x02b7, 0x00}, {0x02ba, 0x04}, /*init Cb gain */ {0x02bb, 0x00}, {0x02be, 0x04}, /*init Cr gain */ {0x02bf, 0x00}, {0x02c2, 0x04}, /*init R gain */ {0x02c3, 0x04}, {0x030a, 0x06}, /*B_buff */ {0x030b, 0x00}, {0x030c, 0x04}, /*G_buff */ {0x030d, 0x00}, {0x030e, 0x05}, /*R_buff */ {0x030f, 0xa0}, {0xfffe, 0x14}, {0x02b3, 0x00}, {0xfffd, 0x80}, /*C_AWB */ {0xfffe, 0x14}, {0x0000, 0x01}, {0x02b0, 0x00}, {0x02b2, 0x01}, {0x02d4, 0x00}, {0x02d5, 0xf0}, {0x02d6, 0x0a}, {0x02d7, 0xff}, {0xfffe, 0x21}, {0x0091, 0xb0}, {0x0092, 0x10}, {0x0001, 0x82}, /*88,contrast, by heyao */ {0x0003, 0xb1}, {0x0051, 0x03}, {0x0096, 0x83}, {0x019c, 0x0a}, {0x01b0, 0x74}, {0x01b1, 0xc0}, {0x01b2, 0x4d}, {0x01b3, 0x70}, {0x01b4, 0x54}, {0x01b5, 0x75}, {0x01b6, 0x58}, {0x01b7, 0x7d}, {0x01b8, 0x58}, {0x01b9, 0x88}, {0x01ba, 0x3f}, {0x01bb, 0x60}, {0x01bc, 0x87}, {0x01bd, 0xc8}, {0x01be, 0x2d}, {0x01bf, 0x58}, {0x01c0, 0x70}, {0x01c1, 0x88}, {0x01c2, 0x38}, {0x01c3, 0x50}, {0x01c4, 0xa0}, {0x01c5, 0xd4}, {0x01c6, 0x36}, {0x01c7, 0x58}, {0x01c8, 0x60}, {0x01c9, 0xa8}, {0x01ca, 0x28}, {0x01cb, 0x40}, {0x01cc, 0x00}, {0x01cd, 0x00}, {0x01ce, 0x00}, {0x01cf, 0x00}, {0x01d0, 0x00}, {0x01d1, 0x00}, {0x01d2, 0x00}, {0x01d3, 0x00}, {0x01d4, 0x00}, {0x01d5, 0x00}, {0x01d6, 0x00}, {0x01d7, 0x00}, {0x01d8, 0x00}, {0x01d9, 0x00}, {0x01da, 0x00}, {0x01db, 0x00}, {0x01dc, 0x00}, {0x01dd, 0x00}, {0x01de, 0x00}, {0x01df, 0x00}, {0x01e0, 0x00}, {0x01e1, 0x00}, {0x01e2, 0x00}, {0x01e3, 0x00}, {0x01e4, 0x00}, {0x01e5, 0x00}, {0x01e6, 0x00}, {0x01e7, 0x00}, {0x01e8, 0x00}, {0x01e9, 0x00}, {0x01ea, 0x00}, {0x01eb, 0x00}, {0x01ec, 0x00}, {0x01ed, 0x00}, {0x01ee, 0x00}, {0x01ef, 0x00}, {0x01f0, 0x44}, {0x01f1, 0x66}, {0x01f2, 0x22}, {0x01f3, 0x10}, {0x01f4, 0x00}, {0x01f5, 0x00}, {0x01f6, 0x00}, {0x01f7, 0x00}, {0xfffd, 0x80}, /*Gamma_Nathan5 */ {0xfffe, 0x21}, {0x0480, 0x0a}, {0x0481, 0x15}, {0x0482, 0x29}, {0x0483, 0x4e}, {0x0484, 0x5e}, {0x0485, 0x6c}, {0x0486, 0x79}, {0x0487, 0x84}, {0x0488, 0x8d}, {0x0489, 0x96}, {0x048a, 0xa4}, {0x048b, 0xaf}, {0x048c, 0xc0}, {0x048d, 0xd0}, {0x048e, 0xe1}, {0x048f, 0x14}, {0xfffd, 0x80}, {0xfffe, 0x21}, {0xd00, 0x01}, {0xD01, 0x83}, {0xD02, 0x01}, {0xD03, 0xE3}, {0xD04, 0x00}, {0xD05, 0xAA}, {0xD06, 0x00}, {0xD07, 0x31}, {0xD08, 0x00}, {0xD09, 0x72}, {0xD0A, 0x00}, {0xD0B, 0x6F}, {0xD0C, 0x01}, {0xD0D, 0x83}, {0xD0E, 0x01}, {0xD0F, 0xE3}, {0xD10, 0x00}, {0xD11, 0xAA}, {0xD12, 0x00}, {0xD13, 0x31}, {0xD14, 0x00}, {0xD15, 0x72}, {0xD16, 0x00}, {0xD17, 0x6F}, {0xD18, 0x01}, {0xD19, 0x83}, {0xD1A, 0x01}, {0xD1B, 0xE3}, {0xD1C, 0x00}, {0xD1D, 0xAA}, {0xD1E, 0x00}, {0xD1F, 0x31}, {0xD20, 0x00}, {0xD21, 0x72}, {0xD22, 0x00}, {0xD23, 0x6F}, {0xd2e, 0x04}, {0xD2F, 0x04}, {0xD30, 0x04}, {0xD31, 0x03}, {0xd28, 0x00}, {0xD29, 0x69}, {0xD2A, 0x00}, {0xD2B, 0xB6}, {0xD2C, 0x01}, {0xD2D, 0x1A}, {0xfffd, 0x80}, /*CIP star */ {0xfffe, 0x21}, {0x0301, 0x10}, {0x0303, 0x6f}, {0x0304, 0x00}, {0x0305, 0x10}, {0x0306, 0x00}, {0x0307, 0x00}, {0x0308, 0x30}, {0x0309, 0x00}, {0x030a, 0x03}, {0x030b, 0x02}, {0x030c, 0x04}, {0x030d, 0x18}, {0x030e, 0x18}, {0x030f, 0xc0}, {0x0310, 0x20}, {0x0311, 0xff}, {0x0312, 0x80}, {0x0313, 0x18}, {0x0314, 0x08}, {0x0315, 0x3f}, {0x0317, 0x06}, {0x0318, 0x00}, {0x0319, 0x1f}, /*CIP end */ {0x031a, 0x00}, {0x031b, 0x00}, {0x031c, 0x00}, {0x031d, 0x00}, {0x031e, 0x12}, {0x031f, 0x14}, /*CIP end */ {0xfffd, 0x80}, /*Denoise */ {0xfffe, 0x21}, {0x0290, 0x06}, {0x0291, 0x08}, {0x0292, 0x00}, {0x029a, 0x00}, {0x029b, 0x02}, {0x029c, 0x04}, {0x029d, 0x06}, {0x029e, 0x08}, {0x029f, 0x09}, {0x02a0, 0x0a}, {0xfffe, 0x21}, {0x0005, 0x90}, {0x0013, 0x10}, {0x0580, 0x08}, {0x0581, 0x3c}, {0x0582, 0x40}, }; static struct regval_list sensor_1080p_25fps_regs[] = { {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0021, 0x0e}, {0x0026, 0x01}, {0x0020, 0x01}, {0x0024, 0x05}, {0x0030, 0x62}, {0x0031, 0x20}, {0x0032, 0x60}, {0x0033, 0x12}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x00bc, 0x91}, {0x001b, 0x00}, {0x0090, 0x28}, /*husanzai 0x28 6131 normal; 0x2b 6131 color bar test */ {0x0038, 0x01}, {0xfffe, 0x26}, {0x0000, 0x00}, {0x0002, 0x00}, {0x0009, 0x04}, {0x4000, 0xF9}, {0x6001, 0x14}, {0x6005, 0xc4}, {0x6006, 0x0F}, {0x6007, 0xA0}, {0x6008, 0x0E}, {0x6009, 0xFC}, {0x8000, 0x3f}, {0x8001, 0x80}, {0x8002, 0x07}, {0x8003, 0x38}, {0x8004, 0x04}, {0x8005, 0x03}, {0x8006, 0x05}, {0x8007, 0x99}, {0x8010, 0x04}, {0x2019, 0x07}, {0x201a, 0x80}, {0x201b, 0x04}, {0x201c, 0x38}, {0x201d, 0x00}, {0x201e, 0x00}, {0x201f, 0x00}, {0x2020, 0x00}, {0x2015, 0x81}, /*80 */ {0x2017, 0x1e}, {0x2018, 0x1e}, {0x2023, 0x03}, {0x8012, 0x80}, {0x8013, 0x07}, {0x8014, 0x38}, {0x8015, 0x04}, {0x8016, 0x00}, {0x8017, 0x00}, {0x8018, 0x00}, {0x8019, 0x00}, {0xfffe, 0x21}, {0x0001, 0x80}, {0x0004, 0x10}, {0x0708, 0x00}, {0x0072, 0x00}, {0x0074, 0x00}, {0x0006, 0x07}, {0x0007, 0x80}, {0x0008, 0x4}, {0x0009, 0x38}, {0x000a, 0x7}, {0x000b, 0x80}, {0x000c, 0x4}, {0x000d, 0x38}, {0x001e, 0x7}, {0x001f, 0x80}, {0x0020, 0x4}, {0x0021, 0x38}, {0x005e, 0x7F}, {0x005f, 0x7}, {0x0060, 0x37}, {0x0061, 0x4}, {0x0064, 0x80}, {0x0065, 0x7}, {0x0066, 0x38}, {0x0067, 0x4}, {0x0076, 0x7}, {0x0077, 0x80}, {0x0078, 0x4}, {0x0079, 0x38}, {0x0700, 0x0}, {0x0701, 0x0}, {0x0702, 0x0}, {0x0703, 0x0}, {0x0704, 0x7}, {0x0705, 0x80}, {0x0706, 0x4}, {0x0707, 0x38}, {0xfffd, 0x80}, {0xfffe, 0x21}, {0x0680, 0x00}, {0x0681, 0x00}, {0x0682, 0x00}, {0x0683, 0x00}, {0x0684, 0x07}, {0x0685, 0x80}, {0x0686, 0x04}, {0x0687, 0x38}, {0xfffe, 0x80}, {0x0004, 0x00}, {0xfffd, 0x80}, {0xfffe, 0x14}, {0x1c00, 0x02}, {0x1c01, 0x30}, {0x1C02, 0x11}, {0x1C03, 0x19}, {0x1c04, 0x38}, {0x1C05, 0x0d}, {0x1C06, 0x78}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0007, 0x6c}, {0x000d, 0x31}, {0x0009, 0x00}, {0x00c4, 0x10}, {0x00c0, 0x01}, {0xfffe, 0x14}, {0x02b3, 0x00}, {0x0002, 0x01}, {0x0022, 0x01}, {0x0094, 0x11}, {0x0095, 0x20}, }; static struct regval_list sensor_720p_30fps_regs[] = { /*add by Nathan 20160118 */ {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0020, 0x01}, {0x0024, 0x05}, {0x0026, 0x01}, {0x0030, 0x62}, {0x0031, 0x20}, {0x0032, 0x60}, {0x0033, 0x12}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x00bc, 0x91}, {0x001b, 0x0}, {0x0090, 0x28}, {0x0038, 0x01}, {0xfffe, 0x26}, {0x0000, 0x00}, {0x0002, 0x0}, {0x0009, 0x4}, {0x4000, 0xF9}, {0x6001, 0x14}, {0x6005, 0xc4}, {0x6006, 0xA}, {0x6007, 0x8C}, {0x6008, 0x9}, {0x6009, 0xFC}, {0x8000, 0x3f}, {0x8001, 0x80}, {0x8002, 0x7}, {0x8003, 0x38}, {0x8004, 0x4}, {0x8005, 0x3}, {0x8006, 0x5}, {0x8007, 0x99}, {0x8010, 0x4}, {0x2019, 0x5}, {0x201a, 0x0}, {0x201b, 0x2}, {0x201c, 0xD0}, {0x201d, 0x0}, {0x201e, 0x0}, {0x201f, 0x0}, {0x2020, 0x0}, {0x2015, 0x81}, /*80 */ {0x2017, 0x1e}, {0x2018, 0x1e}, {0x2023, 0x03}, {0x8012, 0x80}, {0x8013, 0x07}, {0x8014, 0x38}, {0x8015, 0x4}, {0x8016, 0x00}, {0x8017, 0x00}, {0x8018, 0x00}, {0x8019, 0x00}, {0xfffe, 0x21}, {0x0001, 0x90}, {0x0004, 0x18}, {0x0708, 0x00}, {0x0072, 0xc0}, {0x0074, 0x0a}, {0x0006, 0x07}, {0x0007, 0x80}, {0x0008, 0x04}, {0x0009, 0x38}, {0x000a, 0x05}, {0x000b, 0x00}, {0x000c, 0x02}, {0x000d, 0xD0}, {0x001e, 0x7}, {0x001f, 0x80}, {0x0020, 0x04}, {0x0021, 0x38}, {0x005e, 0x7F}, {0x005f, 0x07}, {0x0060, 0x37}, {0x0061, 0x04}, {0x0064, 0x80}, {0x0065, 0x07}, {0x0066, 0x38}, {0x0067, 0x04}, {0x0076, 0x07}, {0x0077, 0x80}, {0x0078, 0x04}, {0x0079, 0x38}, {0x0700, 0x00}, {0x0701, 0x00}, {0x0702, 0x00}, {0x0703, 0x00}, {0x0704, 0x07}, {0x0705, 0x80}, {0x0706, 0x04}, {0x0707, 0x38}, {0xfffe, 0x21}, {0x0680, 0x00}, {0x0681, 0x00}, {0x0682, 0x00}, {0x0683, 0x00}, {0x0684, 0x05}, {0x0685, 0x00}, {0x0686, 0x02}, {0x0687, 0xd0}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0004, 0x00}, {0xfffd, 0x80}, {0xfffe, 0x14}, {0x1c00, 0x02}, {0x1c01, 0x30}, {0x1C02, 0x11}, {0x1C03, 0x1e}, {0x1c04, 0x38}, {0x1C05, 0x0d}, {0x1C06, 0x7e}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0007, 0x6c}, {0x000d, 0x31}, {0x0009, 0x00}, {0x00c4, 0x10}, {0x00c0, 0x01}, {0xfffe, 0x14}, {0x02b3, 0x00}, {0x0002, 0x01}, {0x0022, 0x01}, {0x0094, 0x14}, /*remove flicker */ {0x0095, 0x80}, }; static struct regval_list sensor_480p_30fps_regs[] = { /*add by Nathan 20160118 */ {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0020, 0x01}, {0x0024, 0x05}, {0x0026, 0x01}, {0x0030, 0x62}, {0x0031, 0x20}, {0x0032, 0x60}, {0x0033, 0x12}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x00bc, 0x91}, {0x001b, 0x00}, {0x0090, 0x28}, {0x0038, 0x01}, {0xfffe, 0x26}, {0x0000, 0x00}, {0x0002, 0x00}, {0x0009, 0x04}, {0x4000, 0xF9}, {0x6001, 0x14}, {0x6005, 0xc4}, {0x6006, 0x05}, {0x6007, 0x78}, {0x6008, 0x04}, {0x6009, 0xFC}, {0x8000, 0x3f}, {0x8001, 0x80}, {0x8002, 0x07}, {0x8003, 0x38}, {0x8004, 0x04}, {0x8005, 0x03}, {0x8006, 0x05}, {0x8007, 0x99}, {0x8010, 0x05}, {0x2019, 0x02}, {0x201a, 0x80}, {0x201b, 0x01}, {0x201c, 0xE0}, {0x201d, 0x00}, {0x201e, 0x00}, {0x201f, 0x00}, {0x2020, 0x00}, {0x2015, 0x81}, /*80 */ {0x2017, 0x1e}, {0x2018, 0x1e}, {0x2023, 0x03}, {0x8012, 0xA0}, {0x8013, 0x05}, {0x8014, 0x38}, {0x8015, 0x04}, {0x8016, 0xF0}, {0x8017, 0x00}, {0x8018, 0x00}, {0x8019, 0x00}, {0xfffe, 0x21}, {0x0001, 0x91}, {0x0004, 0x18}, {0x0708, 0x00}, {0x0072, 0xc0}, {0x0074, 0x0a}, {0x0006, 0x5}, {0x0007, 0xA0}, {0x0008, 0x04}, {0x0009, 0x38}, {0x000a, 0x02}, {0x000b, 0x80}, {0x000c, 0x01}, {0x000d, 0xE0}, {0x001e, 0x05}, {0x001f, 0xA0}, {0x0020, 0x04}, {0x0021, 0x38}, {0x005e, 0x9F}, {0x005f, 0x05}, {0x0060, 0x37}, {0x0061, 0x04}, {0x0064, 0xA0}, {0x0065, 0x05}, {0x0066, 0x38}, {0x0067, 0x04}, {0x0076, 0x05}, {0x0077, 0xA0}, {0x0078, 0x04}, {0x0079, 0x38}, {0x0700, 0x00}, {0x0701, 0x00}, {0x0702, 0x00}, {0x0703, 0x00}, {0x0704, 0x05}, {0x0705, 0xA0}, {0x0706, 0x04}, {0x0707, 0x38}, {0xfffe, 0x21}, {0x0680, 0x00}, {0x0681, 0x00}, {0x0682, 0x00}, {0x0683, 0x00}, {0x0684, 0x02}, {0x0685, 0x80}, {0x0686, 0x01}, {0x0687, 0xe0}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0004, 0x00}, {0xfffd, 0x80}, {0xfffe, 0x14}, {0x1c00, 0x02}, {0x1c01, 0x30}, {0x1C02, 0x11}, {0x1C03, 0x1e}, {0x1c04, 0x38}, {0x1C05, 0x0d}, {0x1C06, 0x7e}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0007, 0x6c}, {0x000d, 0x31}, {0x0009, 0x00}, {0x00c4, 0x10}, {0x00c0, 0x01}, {0xfffe, 0x14}, {0x02b3, 0x00}, {0x0002, 0x01}, {0x0022, 0x01}, {0x0094, 0x14}, /*remove flicker */ {0x0095, 0x80}, }; static struct regval_list sensor_640x360p_30fps_regs[] = { /*add by Nathan 20160118 */ {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0020, 0x01}, {0x0024, 0x05}, {0x0026, 0x01}, {0x0030, 0x62}, {0x0031, 0x20}, {0x0032, 0x60}, {0x0033, 0x12}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x00bc, 0x91}, {0x001b, 0x00}, {0x0090, 0x28}, {0x0038, 0x01}, {0xfffe, 0x26}, {0x0000, 0x00}, {0x0002, 0x00}, {0x0009, 0x04}, {0x4000, 0xF9}, {0x6001, 0x14}, {0x6005, 0xc4}, {0x6006, 0x05}, {0x6007, 0x78}, {0x6008, 0x04}, {0x6009, 0xFC}, {0x8000, 0x3f}, {0x8001, 0x80}, {0x8002, 0x07}, {0x8003, 0x38}, {0x8004, 0x04}, {0x8005, 0x03}, {0x8006, 0x05}, {0x8007, 0x99}, {0x8010, 0x04}, {0x2019, 0x02}, {0x201a, 0x80}, {0x201b, 0x01}, {0x201c, 0x68}, {0x201d, 0x00}, {0x201e, 0x00}, {0x201f, 0x00}, {0x2020, 0x00}, {0x2015, 0x81}, /*80*/ {0x2017, 0x1e}, {0x2018, 0x1e}, {0x2023, 0x03}, {0x8012, 0x80}, {0x8013, 0x07}, {0x8014, 0x38}, {0x8015, 0x04}, {0x8016, 0x00}, {0x8017, 0x00}, {0x8018, 0x00}, {0x8019, 0x00}, {0xfffe, 0x21}, {0x0001, 0x90}, {0x0004, 0x18}, {0x0708, 0x00}, {0x0072, 0xc0}, {0x0074, 0x0a}, {0x0006, 0x07}, {0x0007, 0x80}, {0x0008, 0x04}, {0x0009, 0x38}, {0x000a, 0x02}, {0x000b, 0x80}, {0x000c, 0x01}, {0x000d, 0x68}, {0x001e, 0x07}, {0x001f, 0x80}, {0x0020, 0x04}, {0x0021, 0x38}, {0x005e, 0x7F}, {0x005f, 0x07}, {0x0060, 0x37}, {0x0061, 0x04}, {0x0064, 0x80}, {0x0065, 0x07}, {0x0066, 0x38}, {0x0067, 0x04}, {0x0076, 0x07}, {0x0077, 0x80}, {0x0078, 0x04}, {0x0079, 0x38}, {0x0700, 0x00}, {0x0701, 0x00}, {0x0702, 0x00}, {0x0703, 0x00}, {0x0704, 0x07}, {0x0705, 0x80}, {0x0706, 0x04}, {0x0707, 0x38}, {0xfffe, 0x21}, {0x0680, 0x00}, {0x0681, 0x00}, {0x0682, 0x00}, {0x0683, 0x00}, {0x0684, 0x02}, {0x0685, 0x80}, {0x0686, 0x01}, {0x0687, 0x68}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0004, 0x00}, {0xfffd, 0x80}, {0xfffe, 0x14}, {0x1c00, 0x02}, {0x1c01, 0x30}, {0x1C02, 0x11}, {0x1C03, 0x1e}, {0x1c04, 0x38}, {0x1C05, 0x0d}, {0x1C06, 0x7e}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0007, 0x6c}, {0x000d, 0x31}, {0x0009, 0x00}, {0x00c4, 0x10}, {0x00c0, 0x01}, {0xfffe, 0x14}, {0x02b3, 0x00}, {0x0002, 0x01}, {0x0022, 0x01}, {0x0094, 0x14}, /*remove flicker */ {0x0095, 0x80}, }; static struct regval_list sensor_320x240_30fps_regs[] = { /*add by Nathan 20160118 */ {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0020, 0x01}, {0x0024, 0x05}, {0x0026, 0x01}, {0x0030, 0x62}, {0x0031, 0x20}, {0x0032, 0x60}, {0x0033, 0x12}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x00bc, 0x91}, {0x001b, 0x0}, {0x0090, 0x28}, {0x0038, 0x01}, {0xfffe, 0x26}, {0x0000, 0x00}, {0x0002, 0x00}, {0x0009, 0x04}, {0x4000, 0xF9}, {0x6001, 0x14}, {0x6005, 0xc4}, {0x6006, 0x03}, {0x6007, 0x20}, {0x6008, 0x2}, {0x6009, 0x7C}, {0x8000, 0x3f}, {0x8001, 0x80}, {0x8002, 0x07}, {0x8003, 0x38}, {0x8004, 0x4}, {0x8005, 0x3}, {0x8006, 0x5}, {0x8007, 0x99}, {0x8010, 0x5}, {0x2019, 0x1}, {0x201a, 0x40}, {0x201b, 0x0}, {0x201c, 0xF0}, {0x201d, 0x0}, {0x201e, 0x0}, {0x201f, 0x0}, {0x2020, 0x0}, {0x2015, 0x80}, {0x2017, 0x1e}, {0x2018, 0x1e}, {0x2023, 0x3}, {0x8012, 0xA0}, {0x8013, 0x5}, {0x8014, 0x38}, {0x8015, 0x4}, {0x8016, 0xF0}, {0x8017, 0x0}, {0x8018, 0x0}, {0x8019, 0x0}, {0xfffe, 0x21}, {0x0001, 0x11}, {0x0004, 0x18}, {0x0708, 0x0}, {0x0072, 0xc0}, {0x0074, 0x0a}, {0x0006, 0x5}, {0x0007, 0xA0}, {0x0008, 0x4}, {0x0009, 0x38}, {0x000a, 0x1}, {0x000b, 0x40}, {0x000c, 0x0}, {0x000d, 0xF0}, {0x001e, 0x5}, {0x001f, 0xA0}, {0x0020, 0x4}, {0x0021, 0x38}, {0x005e, 0x9F}, {0x005f, 0x5}, {0x0060, 0x37}, {0x0061, 0x4}, {0x0064, 0xA0}, {0x0065, 0x5}, {0x0066, 0x38}, {0x0067, 0x4}, {0x0076, 0x5}, {0x0077, 0xA0}, {0x0078, 0x4}, {0x0079, 0x38}, {0x0700, 0x0}, {0x0701, 0x0}, {0x0702, 0x0}, {0x0703, 0x0}, {0x0704, 0x5}, {0x0705, 0xA0}, {0x0706, 0x4}, {0x0707, 0x38}, {0xfffe, 0x21}, {0x0680, 0x00}, {0x0681, 0x00}, {0x0682, 0x00}, {0x0683, 0x00}, {0x0684, 0x01}, {0x0685, 0x40}, {0x0686, 0x00}, {0x0687, 0xf0}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0004, 0x00}, {0xfffd, 0x80}, {0xfffe, 0x14}, {0x1c00, 0x02}, {0x1c01, 0x30}, {0x1C02, 0x11}, {0x1C03, 0x1e}, {0x1c04, 0x38}, {0x1C05, 0x0d}, {0x1C06, 0x7e}, {0xfffd, 0x80}, {0xfffe, 0x80}, {0x0007, 0x6c}, {0x000d, 0x31}, {0x0009, 0x00}, {0x00c4, 0x10}, {0x00c0, 0x01}, {0xfffe, 0x14}, {0x02b3, 0x00}, {0x0002, 0x01}, {0x0022, 0x01}, {0x0094, 0x14}, /*remove flicker */ {0x0095, 0x80}, }; /* * Here we'll try to encapsulate the changes for just the output * video format. */ static struct regval_list sensor_fmt_yuv422_yuyv[] = { }; static struct regval_list sensor_fmt_yuv422_yvyu[] = { }; static struct regval_list sensor_fmt_yuv422_vyuy[] = { }; static struct regval_list sensor_fmt_yuv422_uyvy[] = { }; static struct regval_list sensor_fmt_raw[] = { }; static int sensor_g_exp(struct v4l2_subdev *sd, __s32 *value) { struct sensor_info *info = to_state(sd); *value = info->exp; vfe_dev_dbg("sensor_get_exposure = %d\n", info->exp); return 0; } /* static int sensor_s_exp(struct v4l2_subdev *sd, unsigned int exp_val) { struct sensor_info *info = to_state(sd); info->exp = exp_val; return 0; } */ static int sensor_g_gain(struct v4l2_subdev *sd, __s32 *value) { struct sensor_info *info = to_state(sd); *value = info->gain; vfe_dev_dbg("sensor_get_gain = %d\n", info->gain); return 0; } /* static int sensor_s_gain(struct v4l2_subdev *sd, int gain_val) { struct sensor_info *info = to_state(sd); info->gain = gain_val; return 0; } */ static int sensor_s_exp_gain(struct v4l2_subdev *sd, struct sensor_exp_gain *exp_gain) { int exp_val, gain_val; struct sensor_info *info = to_state(sd); exp_val = exp_gain->exp_val; gain_val = exp_gain->gain_val; info->exp = exp_val; info->gain = gain_val; return 0; } static int sensor_s_sw_stby(struct v4l2_subdev *sd, int on_off) { int ret = 0; return ret; } /* * Stuff that knows about the sensor. */ static int sensor_power(struct v4l2_subdev *sd, int on) { int ret; ret = 0; switch (on) { case CSI_SUBDEV_STBY_ON: vfe_dev_dbg("CSI_SUBDEV_STBY_ON!\n"); cci_lock(sd); vfe_gpio_write(sd, PWDN, CSI_GPIO_HIGH); vfe_set_mclk(sd, OFF); cci_unlock(sd); break; case CSI_SUBDEV_STBY_OFF: vfe_dev_dbg("CSI_SUBDEV_STBY_OFF!\n"); cci_lock(sd); vfe_set_mclk_freq(sd, MCLK); vfe_set_mclk(sd, ON); usleep_range(10000, 12000); vfe_gpio_write(sd, PWDN, CSI_GPIO_LOW); usleep_range(10000, 12000); cci_unlock(sd); ret = sensor_s_sw_stby(sd, CSI_GPIO_LOW); if (ret < 0) vfe_dev_err("soft stby off falied!\n"); usleep_range(10000, 12000); break; case CSI_SUBDEV_PWR_ON: vfe_dev_dbg("CSI_SUBDEV_PWR_ON!\n"); cci_lock(sd); vfe_gpio_set_status(sd, PWDN, 1); /*set the gpio to output */ vfe_gpio_set_status(sd, RESET, 1); /*set the gpio to output */ vfe_gpio_write(sd, RESET, CSI_GPIO_HIGH); vfe_gpio_write(sd, PWDN, CSI_GPIO_HIGH); usleep_range(1000, 1200); vfe_set_pmu_channel(sd, AFVDD, ON); /*1.2V CVDD_12 */ vfe_set_pmu_channel(sd, DVDD, ON); /*VCAM_D 1.5v */ usleep_range(1000, 1200); vfe_set_pmu_channel(sd, IOVDD, ON); /*VCAM_IO 2.8v */ usleep_range(1000, 1200); vfe_set_pmu_channel(sd, AVDD, ON); /* VCAM_AF 3.3v */ usleep_range(1000, 1200); vfe_gpio_write(sd, PWDN, CSI_GPIO_LOW); usleep_range(10000, 12000); vfe_gpio_write(sd, RESET, CSI_GPIO_LOW); usleep_range(30000, 32000); vfe_gpio_write(sd, RESET, CSI_GPIO_HIGH); vfe_set_mclk_freq(sd, MCLK); vfe_set_mclk(sd, ON); usleep_range(10000, 12000); cci_unlock(sd); break; case CSI_SUBDEV_PWR_OFF: vfe_dev_dbg("CSI_SUBDEV_PWR_OFF!\n"); cci_lock(sd); vfe_gpio_set_status(sd, PWDN, 1); /*set the gpio to output */ vfe_gpio_set_status(sd, RESET, 1); /*set the gpio to output */ vfe_gpio_write(sd, RESET, CSI_GPIO_LOW); vfe_gpio_write(sd, PWDN, CSI_GPIO_HIGH); vfe_set_mclk(sd, OFF); vfe_set_pmu_channel(sd, AVDD, OFF); /* VCAM_AF 3.3v */ usleep_range(10000, 12000); vfe_set_pmu_channel(sd, DVDD, OFF); /*VCAM_D 1.5v */ usleep_range(10000, 12000); vfe_set_pmu_channel(sd, IOVDD, OFF); /*VCAM_IO 2.8v */ vfe_set_pmu_channel(sd, AFVDD, OFF); /*1.2V CVDD_12 */ vfe_gpio_set_status(sd, RESET, 0); /*set the gpio to input */ vfe_gpio_set_status(sd, PWDN, 0); /*set the gpio to input */ cci_unlock(sd); break; default: return -EINVAL; } return 0; } static int sensor_reset(struct v4l2_subdev *sd, u32 val) { switch (val) { case 0: vfe_gpio_write(sd, RESET, CSI_GPIO_HIGH); usleep_range(10000, 12000); break; case 1: vfe_gpio_write(sd, RESET, CSI_GPIO_LOW); usleep_range(10000, 12000); break; default: return -EINVAL; } return 0; } /* Day or Night mode */ static int sensor_s_night_or_not(struct v4l2_subdev *sd, __s32 *value) { static unsigned char night_mode = 3; struct regval_list regs; sensor_write(sd, 0xfffd, 0x80); sensor_write(sd, 0xfffe, 0x14); regs.addr = 0x002b; sensor_read(sd, regs.addr, ®s.data); vfe_dev_dbg("data = %d night_mode %d\n" , regs.data, night_mode); if ((regs.data > 0x74) && (night_mode != 1)) { sensor_write(sd, 0xfffe, 0x21); sensor_write(sd, 0x0001, 0x82); sensor_write(sd, 0x0003, 0xb1); sensor_write(sd, 0x031a, 0x00); sensor_write(sd, 0x031b, 0x30); sensor_write(sd, 0x031c, 0x00); sensor_write(sd, 0x031d, 0x00); sensor_write(sd, 0x031e, 0x0c); sensor_write(sd, 0x031f, 0x0a); sensor_write(sd, 0x0320, 0x00); sensor_write(sd, 0x0321, 0x00); sensor_write(sd, 0x0580, 0x09); sensor_write(sd, 0x0581, 0x3c); sensor_write(sd, 0x0582, 0x40); sensor_write(sd, 0xfffe, 0x21); sensor_write(sd, 0x0005, 0x90); sensor_write(sd, 0x0013, 0x08); sensor_write(sd, 0x019c, 0x0a); sensor_write(sd, 0x0688, 0x20); /* ae window height*/ sensor_write(sd, 0x0689, 0x02); sensor_write(sd, 0x068a, 0x21); sensor_write(sd, 0x068b, 0x12); sensor_write(sd, 0x068c, 0xfa); sensor_write(sd, 0x068d, 0xaf); sensor_write(sd, 0x068e, 0xa1); sensor_write(sd, 0x068f, 0x1a); sensor_write(sd, 0xfffe, 0x80); night_mode = 1; vfe_dev_dbg("night_mode\n"); } else if ((regs.data < 0x6a) && (night_mode != 0)) {/*daymode*/ sensor_write(sd, 0xfffe, 0x21); sensor_write(sd, 0x0001, 0x82); sensor_write(sd, 0x0003, 0xb1); sensor_write(sd, 0x031a, 0x00); sensor_write(sd, 0x031b, 0x00); sensor_write(sd, 0x031c, 0x00); sensor_write(sd, 0x031d, 0x00); sensor_write(sd, 0x031e, 0x14); sensor_write(sd, 0x031f, 0x0c); sensor_write(sd, 0x0320, 0x0a); sensor_write(sd, 0x0321, 0x0f); sensor_write(sd, 0x0580, 0x09); sensor_write(sd, 0x0581, 0x60); sensor_write(sd, 0x0582, 0x68); sensor_write(sd, 0x0013, 0x0d); sensor_write(sd, 0xfffe, 0x21); sensor_write(sd, 0x0005, 0x90); sensor_write(sd, 0x0688, 0x10);/*ae exposure window height */ sensor_write(sd, 0x0689, 0x01); sensor_write(sd, 0x068a, 0x22); sensor_write(sd, 0x068b, 0x22); sensor_write(sd, 0x068c, 0x88); sensor_write(sd, 0x068d, 0x88); sensor_write(sd, 0x068e, 0x44); sensor_write(sd, 0x068f, 0x44); night_mode = 0; vfe_dev_dbg("daymode\n"); } else { vfe_dev_dbg("data = %d night_mode %d\n" , regs.data, night_mode); } *value = night_mode; return 0; } static int sensor_debug(struct v4l2_subdev *sd) { int ret; struct regval_list regs; vfe_dev_dbg("********into aw6131 sensor_debug********\n"); regs.addr = 0xfffe; regs.data = 0x80; ret = sensor_write(sd, regs.addr, regs.data); regs.addr = 0x50; ret = sensor_read(sd, regs.addr, ®s.data); vfe_dev_dbg("********read reg[0x50]= %x ********\n", regs.data); regs.addr = 0x58; ret = sensor_read(sd, regs.addr, ®s.data); if (ret < 0) { vfe_dev_err("sensor_read reg[0x58] at sensor_debug!\n"); return ret; } vfe_dev_dbg("********read reg[0x58]= %x ********\n", regs.data); return 0; } static int sensor_detect(struct v4l2_subdev *sd) { int ret; struct regval_list regs; __s32 status = 0; regs.addr = 0xfffd; regs.data = 0x80; ret = sensor_write(sd, regs.addr, regs.data); sensor_write(sd, 0xfffd, 0x80); sensor_write(sd, 0xfffe, 0x80); regs.addr = 0xfffe; regs.data = 0x80; ret = sensor_write(sd, regs.addr, regs.data); regs.addr = 0xfffe; ret = sensor_read(sd, regs.addr, ®s.data); regs.addr = 0x0003; ret = sensor_read(sd, regs.addr, ®s.data); if (ret < 0) { vfe_dev_err("sensor_read err at sensor_detect!\n"); return ret; } vfe_dev_dbg("OV2710_xc6130 chip ID =%x\n ", regs.data); sensor_s_night_or_not(sd, &status); return 0; } static int sensor_init_restart(struct v4l2_subdev *sd, u32 val) { int ret; vfe_dev_dbg("sensor_init_restart\n"); ret = sensor_write_array(sd, sensor_default_regs, ARRAY_SIZE(sensor_default_regs)); if (ret < 0) { vfe_dev_err("write sensor_default_regs error\n"); return ret; } return 0; } static int sensor_init(struct v4l2_subdev *sd, u32 val) { int ret; struct sensor_info *info = to_state(sd); vfe_dev_dbg("sensor_init\n"); restart = 0; /*Make sure it is a target sensor */ ret = sensor_detect(sd); if (ret) { vfe_dev_err("chip found is not an target chip.\n"); return ret; } vfe_get_standby_mode(sd, &info->stby_mode); if ((info->stby_mode == HW_STBY || info->stby_mode == SW_STBY) && info->init_first_flag == 0) { vfe_dev_print("stby_mode and init_first_flag = 0\n"); return 0; } info->focus_status = 0; info->low_speed = 0; info->width = HD1080_WIDTH; info->height = HD1080_HEIGHT; info->hflip = 0; info->vflip = 0; info->gain = 0; info->tpf.numerator = 1; info->tpf.denominator = 25; ret = sensor_write_array(sd, sensor_default_regs, ARRAY_SIZE(sensor_default_regs)); if (ret < 0) { vfe_dev_err("write sensor_default_regs error\n"); return ret; } sensor_debug(sd); if (info->stby_mode == 0) info->init_first_flag = 0; info->preview_first_flag = 1; return 0; } static long sensor_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { int ret = 0; struct sensor_info *info = to_state(sd); switch (cmd) { case GET_CURRENT_WIN_CFG: if (info->current_wins != NULL) { memcpy(arg, info->current_wins, sizeof(struct sensor_win_size)); ret = 0; } else { vfe_dev_err("empty wins!\n"); ret = -1; } break; case SET_FPS: break; case ISP_SET_EXP_GAIN: sensor_s_exp_gain(sd, (struct sensor_exp_gain *)arg); break; default: return -EINVAL; } return ret; } static struct sensor_format_struct { __u8 *desc; enum v4l2_mbus_pixelcode mbus_code; struct regval_list *regs; int regs_size; int bpp; /* Bytes per pixel */ } sensor_formats[] = { { .desc = "YUYV 4:2:2", .mbus_code = V4L2_MBUS_FMT_YUYV8_2X8, .regs = sensor_fmt_yuv422_yuyv, .regs_size = ARRAY_SIZE(sensor_fmt_yuv422_yuyv), .bpp = 2, } , { .desc = "YVYU 4:2:2", .mbus_code = V4L2_MBUS_FMT_YVYU8_2X8, .regs = sensor_fmt_yuv422_yvyu, .regs_size = ARRAY_SIZE(sensor_fmt_yuv422_yvyu), .bpp = 2, } , { .desc = "UYVY 4:2:2", .mbus_code = V4L2_MBUS_FMT_UYVY8_2X8, .regs = sensor_fmt_yuv422_uyvy, .regs_size = ARRAY_SIZE(sensor_fmt_yuv422_uyvy), .bpp = 2, } , { .desc = "VYUY 4:2:2", .mbus_code = V4L2_MBUS_FMT_VYUY8_2X8, .regs = sensor_fmt_yuv422_vyuy, .regs_size = ARRAY_SIZE(sensor_fmt_yuv422_vyuy), .bpp = 2, } , { .desc = "Raw RGB Bayer", .mbus_code = V4L2_MBUS_FMT_SBGGR10_1X10, .regs = sensor_fmt_raw, .regs_size = ARRAY_SIZE(sensor_fmt_raw), .bpp = 1 }, }; #define N_FMTS ARRAY_SIZE(sensor_formats) /* * Then there is the issue of window sizes. Try to capture the info here. */ static struct sensor_win_size sensor_win_sizes[] = { /* Full HD 1920 *1080 25fps*/ { .width = HD1080_WIDTH, .height = HD1080_HEIGHT, .hoffset = 0, .voffset = 0, .regs = sensor_1080p_25fps_regs, .regs_size = ARRAY_SIZE(sensor_1080p_25fps_regs), .set_size = NULL, } , { .width = HD720_WIDTH, .height = HD720_HEIGHT, .hoffset = 0, .voffset = 0, .regs = sensor_720p_30fps_regs, .regs_size = ARRAY_SIZE(sensor_720p_30fps_regs), .set_size = NULL, } , { .width = VGA_WIDTH, .height = VGA_HEIGHT, .hoffset = 0, .voffset = 0, .regs = sensor_480p_30fps_regs, .regs_size = ARRAY_SIZE(sensor_480p_30fps_regs), .set_size = NULL, } , { .width = VGA_WIDTH, .height = 360, .hoffset = 0, .voffset = 0, .regs = sensor_640x360p_30fps_regs, .regs_size = ARRAY_SIZE(sensor_640x360p_30fps_regs), .set_size = NULL, } , { .width = QVGA_WIDTH, .height = QVGA_HEIGHT, .hoffset = 0, .voffset = 0, .regs = sensor_320x240_30fps_regs, .regs_size = ARRAY_SIZE(sensor_320x240_30fps_regs), .set_size = NULL, } }; #define N_WIN_SIZES (ARRAY_SIZE(sensor_win_sizes)) static int sensor_enum_fmt(struct v4l2_subdev *sd, unsigned index, enum v4l2_mbus_pixelcode *code) { if (index >= N_FMTS) return -EINVAL; *code = sensor_formats[index].mbus_code; return 0; } static int sensor_enum_size(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize) { if (fsize->index > N_WIN_SIZES - 1) return -EINVAL; fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; fsize->discrete.width = sensor_win_sizes[fsize->index].width; fsize->discrete.height = sensor_win_sizes[fsize->index].height; return 0; } static int sensor_try_fmt_internal(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *fmt, struct sensor_format_struct **ret_fmt, struct sensor_win_size **ret_wsize) { int index; struct sensor_win_size *wsize; struct sensor_info *info = to_state(sd); for (index = 0; index < N_FMTS; index++) if (sensor_formats[index].mbus_code == fmt->code) break; if (index >= N_FMTS) return -EINVAL; if (ret_fmt != NULL) *ret_fmt = sensor_formats + index; /* * Fields: the sensor devices claim to be progressive. */ fmt->field = V4L2_FIELD_NONE; /* * Round requested image size down to the nearest * we support, but not below the smallest. */ for (wsize = sensor_win_sizes; wsize < sensor_win_sizes + N_WIN_SIZES; wsize++) if (fmt->width >= wsize->width && fmt->height >= wsize->height) break; if (wsize >= sensor_win_sizes + N_WIN_SIZES) wsize--; /* Take the smallest one */ if (ret_wsize != NULL) *ret_wsize = wsize; /* * Note the size we'll actually handle. */ fmt->width = wsize->width; fmt->height = wsize->height; info->current_wins = wsize; return 0; } static int sensor_try_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *fmt) { return sensor_try_fmt_internal(sd, fmt, NULL, NULL); } static int sensor_g_mbus_config(struct v4l2_subdev *sd, struct v4l2_mbus_config *cfg) { cfg->type = V4L2_MBUS_PARALLEL; cfg->flags = V4L2_MBUS_MASTER | VREF_POL | HREF_POL | CLK_POL; return 0; } static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *fmt) { int ret; struct sensor_format_struct *sensor_fmt; struct sensor_win_size *wsize; struct sensor_info *info = to_state(sd); vfe_dev_dbg("sensor_s_fmt\n"); if (restart == true) sensor_init_restart(sd, 0); restart = false; ret = sensor_try_fmt_internal(sd, fmt, &sensor_fmt, &wsize); if (ret) return ret; if (info->capture_mode == V4L2_MODE_VIDEO) { /*video */ } else if (info->capture_mode == V4L2_MODE_IMAGE) { /*image */ } LOG_ERR_RET(sensor_write_array (sd, sensor_fmt->regs, sensor_fmt->regs_size)) ret = 0; if (wsize->regs) LOG_ERR_RET(sensor_write_array (sd, wsize->regs, wsize->regs_size)) if (wsize->set_size) LOG_ERR_RET(wsize->set_size(sd)) info->fmt = sensor_fmt; info->width = wsize->width; info->height = wsize->height; vfe_dev_print("s_fmt set width = %d, height = %d\n", wsize->width, wsize->height); if (info->capture_mode == V4L2_MODE_VIDEO) { /*video */ } else { /*capture image */ } sensor_debug(sd); return 0; } /* * Implement G/S_PARM. There is a "high quality" mode we could try * to do someday; for now, we just do the frame rate tweak. */ static int sensor_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) { struct v4l2_captureparm *cp = &parms->parm.capture; struct sensor_info *info = to_state(sd); if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; memset(cp, 0, sizeof(struct v4l2_captureparm)); cp->capability = V4L2_CAP_TIMEPERFRAME; cp->capturemode = info->capture_mode; return 0; } static int sensor_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) { struct v4l2_captureparm *cp = &parms->parm.capture; struct sensor_info *info = to_state(sd); vfe_dev_dbg("sensor_s_parm\n"); if (parms->parm.capture.reserved[0] == 1) { printk("sensor_s_parm camera restart\n"); restart = true; } if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; if (info->tpf.numerator == 0) return -EINVAL; info->capture_mode = cp->capturemode; return 0; } static int sensor_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc) { /* Fill in min, max, step and default value for these controls. */ /* see include/linux/videodev2.h for details */ switch (qc->id) { case V4L2_CID_GAIN: return v4l2_ctrl_query_fill(qc, 1 * 16, 16 * 16, 1, 16); case V4L2_CID_EXPOSURE: return v4l2_ctrl_query_fill(qc, 1, 65536 * 16, 1, 1); case V4L2_CID_FRAME_RATE: return v4l2_ctrl_query_fill(qc, 15, 120, 1, 30); } return -EINVAL; } static int sensor_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) { switch (ctrl->id) { case V4L2_CID_GAIN: return sensor_g_gain(sd, &ctrl->value); case V4L2_CID_EXPOSURE: return sensor_g_exp(sd, &ctrl->value); } return -EINVAL; } static int sensor_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) { #if 0 struct v4l2_queryctrl qc; int ret; qc.id = ctrl->id; ret = sensor_queryctrl(sd, &qc); if (ret < 0) { return ret; } if (ctrl->value < qc.minimum || ctrl->value > qc.maximum) { vfe_dev_err("max gain qurery is %d,min gain qurey is %d\n", qc.maximum, qc.minimum); return -ERANGE; } switch (ctrl->id) { case V4L2_CID_GAIN: return sensor_s_gain(sd, ctrl->value); case V4L2_CID_EXPOSURE: return sensor_s_exp(sd, ctrl->value); } return -EINVAL; #else return 0; #endif } static int sensor_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip) { struct i2c_client *client = v4l2_get_subdevdata(sd); return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_SENSOR, 0); } /* ----------------------------------------------------------------------- */ static const struct v4l2_subdev_core_ops sensor_core_ops = { .g_chip_ident = sensor_g_chip_ident, .g_ctrl = sensor_g_ctrl, .s_ctrl = sensor_s_ctrl, .queryctrl = sensor_queryctrl, .reset = sensor_reset, .init = sensor_init, .s_power = sensor_power, .ioctl = sensor_ioctl, }; static const struct v4l2_subdev_video_ops sensor_video_ops = { .enum_mbus_fmt = sensor_enum_fmt, .enum_framesizes = sensor_enum_size, .try_mbus_fmt = sensor_try_fmt, .s_mbus_fmt = sensor_s_fmt, .s_parm = sensor_s_parm, .g_parm = sensor_g_parm, .g_mbus_config = sensor_g_mbus_config, }; static const struct v4l2_subdev_ops sensor_ops = { .core = &sensor_core_ops, .video = &sensor_video_ops, }; /* ----------------------------------------------------------------------- */ static struct cci_driver cci_drv = { .name = SENSOR_NAME, .addr_width = CCI_BITS_16, .data_width = CCI_BITS_8, }; static int sensor_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct v4l2_subdev *sd; struct sensor_info *info; info = kzalloc(sizeof(struct sensor_info), GFP_KERNEL); if (info == NULL) return -ENOMEM; sd = &info->sd; glb_sd = sd; cci_dev_probe_helper(sd, client, &sensor_ops, &cci_drv); restart = 0; info->fmt = &sensor_formats[0]; info->af_first_flag = 1; info->init_first_flag = 1; return 0; } static int sensor_remove(struct i2c_client *client) { struct v4l2_subdev *sd; sd = cci_dev_remove_helper(client, &cci_drv); kfree(to_state(sd)); return 0; } static const struct i2c_device_id sensor_id[] = { {SENSOR_NAME, 0}, {} }; MODULE_DEVICE_TABLE(i2c, sensor_id); static struct i2c_driver sensor_driver = { .driver = { .owner = THIS_MODULE, .name = SENSOR_NAME, }, .probe = sensor_probe, .remove = sensor_remove, .id_table = sensor_id, }; static __init int init_sensor(void) { return cci_dev_init_helper(&sensor_driver); } static __exit void exit_sensor(void) { cci_dev_exit_helper(&sensor_driver); } module_init(init_sensor); module_exit(exit_sensor);