xref: /linux/drivers/media/usb/gspca/vc032x.c (revision 762f99f4f3cb41a775b5157dd761217beba65873)
1fd9871f7SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later
20c0d06caSMauro Carvalho Chehab /*
30c0d06caSMauro Carvalho Chehab  * Z-star vc0321 library
40c0d06caSMauro Carvalho Chehab  *
50c0d06caSMauro Carvalho Chehab  * Copyright (C) 2009-2010 Jean-François Moine <http://moinejf.free.fr>
60c0d06caSMauro Carvalho Chehab  * Copyright (C) 2006 Koninski Artur takeshi87@o2.pl
70c0d06caSMauro Carvalho Chehab  * Copyright (C) 2006 Michel Xhaard
80c0d06caSMauro Carvalho Chehab  */
90c0d06caSMauro Carvalho Chehab 
100c0d06caSMauro Carvalho Chehab #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
110c0d06caSMauro Carvalho Chehab 
120c0d06caSMauro Carvalho Chehab #define MODULE_NAME "vc032x"
130c0d06caSMauro Carvalho Chehab 
140c0d06caSMauro Carvalho Chehab #include "gspca.h"
150c0d06caSMauro Carvalho Chehab 
160c0d06caSMauro Carvalho Chehab MODULE_AUTHOR("Jean-François Moine <http://moinejf.free.fr>");
170c0d06caSMauro Carvalho Chehab MODULE_DESCRIPTION("GSPCA/VC032X USB Camera Driver");
180c0d06caSMauro Carvalho Chehab MODULE_LICENSE("GPL");
190c0d06caSMauro Carvalho Chehab 
200c0d06caSMauro Carvalho Chehab /* specific webcam descriptor */
210c0d06caSMauro Carvalho Chehab struct sd {
220c0d06caSMauro Carvalho Chehab 	struct gspca_dev gspca_dev;	/* !! must be the first item */
230c0d06caSMauro Carvalho Chehab 	struct { /* hvflip cluster */
240c0d06caSMauro Carvalho Chehab 		struct v4l2_ctrl *hflip;
250c0d06caSMauro Carvalho Chehab 		struct v4l2_ctrl *vflip;
260c0d06caSMauro Carvalho Chehab 	};
270c0d06caSMauro Carvalho Chehab 
280c0d06caSMauro Carvalho Chehab 	u8 image_offset;
290c0d06caSMauro Carvalho Chehab 
300c0d06caSMauro Carvalho Chehab 	u8 bridge;
310c0d06caSMauro Carvalho Chehab 	u8 sensor;
320c0d06caSMauro Carvalho Chehab 	u8 flags;
330c0d06caSMauro Carvalho Chehab #define FL_SAMSUNG 0x01		/* SamsungQ1 (2 sensors) */
340c0d06caSMauro Carvalho Chehab #define FL_HFLIP 0x02		/* mirrored by default */
350c0d06caSMauro Carvalho Chehab #define FL_VFLIP 0x04		/* vertical flipped by default */
360c0d06caSMauro Carvalho Chehab };
370c0d06caSMauro Carvalho Chehab enum bridges {
380c0d06caSMauro Carvalho Chehab 	BRIDGE_VC0321,
390c0d06caSMauro Carvalho Chehab 	BRIDGE_VC0323,
400c0d06caSMauro Carvalho Chehab };
410c0d06caSMauro Carvalho Chehab enum sensors {
420c0d06caSMauro Carvalho Chehab 	SENSOR_HV7131R,
430c0d06caSMauro Carvalho Chehab 	SENSOR_MI0360,
440c0d06caSMauro Carvalho Chehab 	SENSOR_MI1310_SOC,
450c0d06caSMauro Carvalho Chehab 	SENSOR_MI1320,
460c0d06caSMauro Carvalho Chehab 	SENSOR_MI1320_SOC,
470c0d06caSMauro Carvalho Chehab 	SENSOR_OV7660,
480c0d06caSMauro Carvalho Chehab 	SENSOR_OV7670,
490c0d06caSMauro Carvalho Chehab 	SENSOR_PO1200,
500c0d06caSMauro Carvalho Chehab 	SENSOR_PO3130NC,
510c0d06caSMauro Carvalho Chehab 	SENSOR_POxxxx,
520c0d06caSMauro Carvalho Chehab 	NSENSORS
530c0d06caSMauro Carvalho Chehab };
540c0d06caSMauro Carvalho Chehab 
550c0d06caSMauro Carvalho Chehab 
560c0d06caSMauro Carvalho Chehab static const struct v4l2_pix_format vc0321_mode[] = {
570c0d06caSMauro Carvalho Chehab 	{320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
5891de062fSLuca Bonissi 		.bytesperline = 320 * 2,
590c0d06caSMauro Carvalho Chehab 		.sizeimage = 320 * 240 * 2,
600c0d06caSMauro Carvalho Chehab 		.colorspace = V4L2_COLORSPACE_SRGB,
610c0d06caSMauro Carvalho Chehab 		.priv = 1},
620c0d06caSMauro Carvalho Chehab 	{640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
6391de062fSLuca Bonissi 		.bytesperline = 640 * 2,
640c0d06caSMauro Carvalho Chehab 		.sizeimage = 640 * 480 * 2,
650c0d06caSMauro Carvalho Chehab 		.colorspace = V4L2_COLORSPACE_SRGB,
660c0d06caSMauro Carvalho Chehab 		.priv = 0},
670c0d06caSMauro Carvalho Chehab };
680c0d06caSMauro Carvalho Chehab static const struct v4l2_pix_format vc0323_mode[] = {
690c0d06caSMauro Carvalho Chehab 	{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
700c0d06caSMauro Carvalho Chehab 		.bytesperline = 320,
710c0d06caSMauro Carvalho Chehab 		.sizeimage = 320 * 240 * 3 / 8 + 590,
720c0d06caSMauro Carvalho Chehab 		.colorspace = V4L2_COLORSPACE_JPEG,
730c0d06caSMauro Carvalho Chehab 		.priv = 1},
740c0d06caSMauro Carvalho Chehab 	{640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
750c0d06caSMauro Carvalho Chehab 		.bytesperline = 640,
760c0d06caSMauro Carvalho Chehab 		.sizeimage = 640 * 480 * 3 / 8 + 590,
770c0d06caSMauro Carvalho Chehab 		.colorspace = V4L2_COLORSPACE_JPEG,
780c0d06caSMauro Carvalho Chehab 		.priv = 0},
790c0d06caSMauro Carvalho Chehab 	{1280, 960, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, /* mi1310_soc only */
800c0d06caSMauro Carvalho Chehab 		.bytesperline = 1280,
810c0d06caSMauro Carvalho Chehab 		.sizeimage = 1280 * 960 * 3 / 8 + 590,
820c0d06caSMauro Carvalho Chehab 		.colorspace = V4L2_COLORSPACE_JPEG,
830c0d06caSMauro Carvalho Chehab 		.priv = 2},
840c0d06caSMauro Carvalho Chehab };
850c0d06caSMauro Carvalho Chehab static const struct v4l2_pix_format bi_mode[] = {
860c0d06caSMauro Carvalho Chehab 	{320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
8791de062fSLuca Bonissi 		.bytesperline = 320 * 2,
880c0d06caSMauro Carvalho Chehab 		.sizeimage = 320 * 240 * 2,
890c0d06caSMauro Carvalho Chehab 		.colorspace = V4L2_COLORSPACE_SRGB,
900c0d06caSMauro Carvalho Chehab 		.priv = 2},
910c0d06caSMauro Carvalho Chehab 	{640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
9291de062fSLuca Bonissi 		.bytesperline = 640 * 2,
930c0d06caSMauro Carvalho Chehab 		.sizeimage = 640 * 480 * 2,
940c0d06caSMauro Carvalho Chehab 		.colorspace = V4L2_COLORSPACE_SRGB,
950c0d06caSMauro Carvalho Chehab 		.priv = 1},
960c0d06caSMauro Carvalho Chehab 	{1280, 1024, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
9791de062fSLuca Bonissi 		.bytesperline = 1280 * 2,
980c0d06caSMauro Carvalho Chehab 		.sizeimage = 1280 * 1024 * 2,
990c0d06caSMauro Carvalho Chehab 		.colorspace = V4L2_COLORSPACE_SRGB,
1000c0d06caSMauro Carvalho Chehab 		.priv = 0},
1010c0d06caSMauro Carvalho Chehab };
1020c0d06caSMauro Carvalho Chehab static const struct v4l2_pix_format svga_mode[] = {
1030c0d06caSMauro Carvalho Chehab 	{800, 600, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
1040c0d06caSMauro Carvalho Chehab 		.bytesperline = 800,
1050c0d06caSMauro Carvalho Chehab 		.sizeimage = 800 * 600 * 1 / 4 + 590,
1060c0d06caSMauro Carvalho Chehab 		.colorspace = V4L2_COLORSPACE_JPEG,
1070c0d06caSMauro Carvalho Chehab 		.priv = 0},
1080c0d06caSMauro Carvalho Chehab };
1090c0d06caSMauro Carvalho Chehab 
1100c0d06caSMauro Carvalho Chehab /* OV7660/7670 registers */
1110c0d06caSMauro Carvalho Chehab #define OV7660_REG_MVFP 0x1e
1120c0d06caSMauro Carvalho Chehab #define OV7660_MVFP_MIRROR	0x20
1130c0d06caSMauro Carvalho Chehab #define OV7660_MVFP_VFLIP	0x10
1140c0d06caSMauro Carvalho Chehab 
1150c0d06caSMauro Carvalho Chehab static const u8 mi0360_matrix[9] = {
1160c0d06caSMauro Carvalho Chehab 	0x50, 0xf8, 0xf8, 0xf5, 0x50, 0xfb, 0xff, 0xf1, 0x50
1170c0d06caSMauro Carvalho Chehab };
1180c0d06caSMauro Carvalho Chehab 
1190c0d06caSMauro Carvalho Chehab static const u8 mi0360_initVGA_JPG[][4] = {
1200c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
1210c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
1220c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x24, 0xcc},
1230c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x25, 0xcc},
1240c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
1250c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
1260c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
1270c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x03, 0xcc},
1280c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0a, 0xcc},
1290c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
1300c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
1310c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x01, 0xcc},
1320c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},
1330c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},
1340c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
1350c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
1360c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},
1370c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x7f, 0xcc},
1380c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xdd, 0xcc},	/* i2c add: 5d */
1390c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x02, 0xcc},
1400c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x25, 0xcc},
1410c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0x71, 0xcc},
1420c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x13, 0xcc},
1430c0d06caSMauro Carvalho Chehab 	{0xb8, 0x27, 0x20, 0xcc},
1440c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2c, 0x50, 0xcc},
1450c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2d, 0xf8, 0xcc},
1460c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2e, 0xf8, 0xcc},
1470c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2f, 0xf8, 0xcc},
1480c0d06caSMauro Carvalho Chehab 	{0xb8, 0x30, 0x50, 0xcc},
1490c0d06caSMauro Carvalho Chehab 	{0xb8, 0x31, 0xf8, 0xcc},
1500c0d06caSMauro Carvalho Chehab 	{0xb8, 0x32, 0xf8, 0xcc},
1510c0d06caSMauro Carvalho Chehab 	{0xb8, 0x33, 0xf8, 0xcc},
1520c0d06caSMauro Carvalho Chehab 	{0xb8, 0x34, 0x50, 0xcc},
1530c0d06caSMauro Carvalho Chehab 	{0xb8, 0x35, 0x00, 0xcc},
1540c0d06caSMauro Carvalho Chehab 	{0xb8, 0x36, 0x00, 0xcc},
1550c0d06caSMauro Carvalho Chehab 	{0xb8, 0x37, 0x00, 0xcc},
1560c0d06caSMauro Carvalho Chehab 	{0xb8, 0x01, 0x79, 0xcc},
1570c0d06caSMauro Carvalho Chehab 	{0xb8, 0x08, 0xe0, 0xcc},
1580c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
1590c0d06caSMauro Carvalho Chehab 	{0xb8, 0x01, 0x79, 0xcc},
1600c0d06caSMauro Carvalho Chehab 	{0xb8, 0x14, 0x18, 0xcc},
1610c0d06caSMauro Carvalho Chehab 	{0xb8, 0xb2, 0x0a, 0xcc},
1620c0d06caSMauro Carvalho Chehab 	{0xb8, 0xb4, 0x0a, 0xcc},
1630c0d06caSMauro Carvalho Chehab 	{0xb8, 0xb5, 0x0a, 0xcc},
1640c0d06caSMauro Carvalho Chehab 	{0xb8, 0xfe, 0x00, 0xcc},
1650c0d06caSMauro Carvalho Chehab 	{0xb8, 0xff, 0x28, 0xcc},
1660c0d06caSMauro Carvalho Chehab 	{0xb9, 0x00, 0x28, 0xcc},
1670c0d06caSMauro Carvalho Chehab 	{0xb9, 0x01, 0x28, 0xcc},
1680c0d06caSMauro Carvalho Chehab 	{0xb9, 0x02, 0x28, 0xcc},
1690c0d06caSMauro Carvalho Chehab 	{0xb9, 0x03, 0x00, 0xcc},
1700c0d06caSMauro Carvalho Chehab 	{0xb9, 0x04, 0x00, 0xcc},
1710c0d06caSMauro Carvalho Chehab 	{0xb9, 0x05, 0x3c, 0xcc},
1720c0d06caSMauro Carvalho Chehab 	{0xb9, 0x06, 0x3c, 0xcc},
1730c0d06caSMauro Carvalho Chehab 	{0xb9, 0x07, 0x3c, 0xcc},
1740c0d06caSMauro Carvalho Chehab 	{0xb9, 0x08, 0x3c, 0xcc},
1750c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},
1760c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8f, 0xff, 0xcc},
1770c0d06caSMauro Carvalho Chehab 	{0xb8, 0x81, 0x09, 0xcc},
1780c0d06caSMauro Carvalho Chehab 	{0x31, 0x00, 0x00, 0xbb},
1790c0d06caSMauro Carvalho Chehab 	{0x09, 0x01, 0xc7, 0xbb},
1800c0d06caSMauro Carvalho Chehab 	{0x34, 0x01, 0x00, 0xbb},
1810c0d06caSMauro Carvalho Chehab 	{0x2b, 0x00, 0x28, 0xbb},
1820c0d06caSMauro Carvalho Chehab 	{0x2c, 0x00, 0x30, 0xbb},
1830c0d06caSMauro Carvalho Chehab 	{0x2d, 0x00, 0x30, 0xbb},
1840c0d06caSMauro Carvalho Chehab 	{0x2e, 0x00, 0x28, 0xbb},
1850c0d06caSMauro Carvalho Chehab 	{0x62, 0x04, 0x11, 0xbb},
1860c0d06caSMauro Carvalho Chehab 	{0x03, 0x01, 0xe0, 0xbb},
1870c0d06caSMauro Carvalho Chehab 	{0x2c, 0x00, 0x2c, 0xbb},
1880c0d06caSMauro Carvalho Chehab 	{0x20, 0xd0, 0x00, 0xbb},
1890c0d06caSMauro Carvalho Chehab 	{0x01, 0x00, 0x08, 0xbb},
1900c0d06caSMauro Carvalho Chehab 	{0x06, 0x00, 0x10, 0xbb},
1910c0d06caSMauro Carvalho Chehab 	{0x05, 0x00, 0x20, 0xbb},
1920c0d06caSMauro Carvalho Chehab 	{0x20, 0x00, 0x00, 0xbb},
1930c0d06caSMauro Carvalho Chehab 	{0xb6, 0x00, 0x00, 0xcc},
1940c0d06caSMauro Carvalho Chehab 	{0xb6, 0x03, 0x02, 0xcc},
1950c0d06caSMauro Carvalho Chehab 	{0xb6, 0x02, 0x80, 0xcc},
1960c0d06caSMauro Carvalho Chehab 	{0xb6, 0x05, 0x01, 0xcc},
1970c0d06caSMauro Carvalho Chehab 	{0xb6, 0x04, 0xe0, 0xcc},
1980c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0x78, 0xcc},
1990c0d06caSMauro Carvalho Chehab 	{0xb6, 0x18, 0x02, 0xcc},
2000c0d06caSMauro Carvalho Chehab 	{0xb6, 0x17, 0x58, 0xcc},
2010c0d06caSMauro Carvalho Chehab 	{0xb6, 0x16, 0x00, 0xcc},
2020c0d06caSMauro Carvalho Chehab 	{0xb6, 0x22, 0x12, 0xcc},
2030c0d06caSMauro Carvalho Chehab 	{0xb6, 0x23, 0x0b, 0xcc},
2040c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x02, 0xcc},
2050c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x39, 0xcc},
2060c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x04, 0xcc},
2070c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x10, 0xcc},
2080c0d06caSMauro Carvalho Chehab 	{0xb9, 0x12, 0x00, 0xcc},
2090c0d06caSMauro Carvalho Chehab 	{0xb9, 0x13, 0x0a, 0xcc},
2100c0d06caSMauro Carvalho Chehab 	{0xb9, 0x14, 0x0a, 0xcc},
2110c0d06caSMauro Carvalho Chehab 	{0xb9, 0x15, 0x0a, 0xcc},
2120c0d06caSMauro Carvalho Chehab 	{0xb9, 0x16, 0x0a, 0xcc},
2130c0d06caSMauro Carvalho Chehab 	{0xb9, 0x18, 0x00, 0xcc},
2140c0d06caSMauro Carvalho Chehab 	{0xb9, 0x19, 0x0f, 0xcc},
2150c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1a, 0x0f, 0xcc},
2160c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1b, 0x0f, 0xcc},
2170c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1c, 0x0f, 0xcc},
2180c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},
2190c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8f, 0xff, 0xcc},
2200c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0xf8, 0xcc},
2210c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0c, 0x20, 0xcc},
2220c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0d, 0x70, 0xcc},
2230c0d06caSMauro Carvalho Chehab 	{0xb6, 0x13, 0x13, 0xcc},
2240c0d06caSMauro Carvalho Chehab 	{0x35, 0x00, 0x60, 0xbb},
2250c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
2260c0d06caSMauro Carvalho Chehab 	{}
2270c0d06caSMauro Carvalho Chehab };
2280c0d06caSMauro Carvalho Chehab static const u8 mi0360_initQVGA_JPG[][4] = {
2290c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
2300c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
2310c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x24, 0xcc},
2320c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x25, 0xcc},
2330c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
2340c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
2350c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
2360c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x03, 0xcc},
2370c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0a, 0xcc},
2380c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
2390c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
2400c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x01, 0xcc},
2410c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},
2420c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},
2430c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
2440c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
2450c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},
2460c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x7f, 0xcc},
2470c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xdd, 0xcc},
2480c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x02, 0xcc},
2490c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x25, 0xcc},
2500c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0xd1, 0xcc},
2510c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x13, 0xcc},
2520c0d06caSMauro Carvalho Chehab 	{0xb8, 0x27, 0x20, 0xcc},
2530c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2c, 0x50, 0xcc},
2540c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2d, 0xf8, 0xcc},
2550c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2e, 0xf8, 0xcc},
2560c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2f, 0xf8, 0xcc},
2570c0d06caSMauro Carvalho Chehab 	{0xb8, 0x30, 0x50, 0xcc},
2580c0d06caSMauro Carvalho Chehab 	{0xb8, 0x31, 0xf8, 0xcc},
2590c0d06caSMauro Carvalho Chehab 	{0xb8, 0x32, 0xf8, 0xcc},
2600c0d06caSMauro Carvalho Chehab 	{0xb8, 0x33, 0xf8, 0xcc},
2610c0d06caSMauro Carvalho Chehab 	{0xb8, 0x34, 0x50, 0xcc},
2620c0d06caSMauro Carvalho Chehab 	{0xb8, 0x35, 0x00, 0xcc},
2630c0d06caSMauro Carvalho Chehab 	{0xb8, 0x36, 0x00, 0xcc},
2640c0d06caSMauro Carvalho Chehab 	{0xb8, 0x37, 0x00, 0xcc},
2650c0d06caSMauro Carvalho Chehab 	{0xb8, 0x01, 0x79, 0xcc},
2660c0d06caSMauro Carvalho Chehab 	{0xb8, 0x08, 0xe0, 0xcc},
2670c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
2680c0d06caSMauro Carvalho Chehab 	{0xb8, 0x01, 0x79, 0xcc},
2690c0d06caSMauro Carvalho Chehab 	{0xb8, 0x14, 0x18, 0xcc},
2700c0d06caSMauro Carvalho Chehab 	{0xb8, 0xb2, 0x0a, 0xcc},
2710c0d06caSMauro Carvalho Chehab 	{0xb8, 0xb4, 0x0a, 0xcc},
2720c0d06caSMauro Carvalho Chehab 	{0xb8, 0xb5, 0x0a, 0xcc},
2730c0d06caSMauro Carvalho Chehab 	{0xb8, 0xfe, 0x00, 0xcc},
2740c0d06caSMauro Carvalho Chehab 	{0xb8, 0xff, 0x28, 0xcc},
2750c0d06caSMauro Carvalho Chehab 	{0xb9, 0x00, 0x28, 0xcc},
2760c0d06caSMauro Carvalho Chehab 	{0xb9, 0x01, 0x28, 0xcc},
2770c0d06caSMauro Carvalho Chehab 	{0xb9, 0x02, 0x28, 0xcc},
2780c0d06caSMauro Carvalho Chehab 	{0xb9, 0x03, 0x00, 0xcc},
2790c0d06caSMauro Carvalho Chehab 	{0xb9, 0x04, 0x00, 0xcc},
2800c0d06caSMauro Carvalho Chehab 	{0xb9, 0x05, 0x3c, 0xcc},
2810c0d06caSMauro Carvalho Chehab 	{0xb9, 0x06, 0x3c, 0xcc},
2820c0d06caSMauro Carvalho Chehab 	{0xb9, 0x07, 0x3c, 0xcc},
2830c0d06caSMauro Carvalho Chehab 	{0xb9, 0x08, 0x3c, 0xcc},
2840c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},
2850c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8f, 0xff, 0xcc},
2860c0d06caSMauro Carvalho Chehab 	{0xb8, 0x81, 0x09, 0xcc},
2870c0d06caSMauro Carvalho Chehab 	{0x31, 0x00, 0x00, 0xbb},
2880c0d06caSMauro Carvalho Chehab 	{0x09, 0x01, 0xc7, 0xbb},
2890c0d06caSMauro Carvalho Chehab 	{0x34, 0x01, 0x00, 0xbb},
2900c0d06caSMauro Carvalho Chehab 	{0x2b, 0x00, 0x28, 0xbb},
2910c0d06caSMauro Carvalho Chehab 	{0x2c, 0x00, 0x30, 0xbb},
2920c0d06caSMauro Carvalho Chehab 	{0x2d, 0x00, 0x30, 0xbb},
2930c0d06caSMauro Carvalho Chehab 	{0x2e, 0x00, 0x28, 0xbb},
2940c0d06caSMauro Carvalho Chehab 	{0x62, 0x04, 0x11, 0xbb},
2950c0d06caSMauro Carvalho Chehab 	{0x03, 0x01, 0xe0, 0xbb},
2960c0d06caSMauro Carvalho Chehab 	{0x2c, 0x00, 0x2c, 0xbb},
2970c0d06caSMauro Carvalho Chehab 	{0x20, 0xd0, 0x00, 0xbb},
2980c0d06caSMauro Carvalho Chehab 	{0x01, 0x00, 0x08, 0xbb},
2990c0d06caSMauro Carvalho Chehab 	{0x06, 0x00, 0x10, 0xbb},
3000c0d06caSMauro Carvalho Chehab 	{0x05, 0x00, 0x20, 0xbb},
3010c0d06caSMauro Carvalho Chehab 	{0x20, 0x00, 0x00, 0xbb},
3020c0d06caSMauro Carvalho Chehab 	{0xb6, 0x00, 0x00, 0xcc},
3030c0d06caSMauro Carvalho Chehab 	{0xb6, 0x03, 0x01, 0xcc},
3040c0d06caSMauro Carvalho Chehab 	{0xb6, 0x02, 0x40, 0xcc},
3050c0d06caSMauro Carvalho Chehab 	{0xb6, 0x05, 0x00, 0xcc},
3060c0d06caSMauro Carvalho Chehab 	{0xb6, 0x04, 0xf0, 0xcc},
3070c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0x78, 0xcc},
3080c0d06caSMauro Carvalho Chehab 	{0xb6, 0x18, 0x00, 0xcc},
3090c0d06caSMauro Carvalho Chehab 	{0xb6, 0x17, 0x96, 0xcc},
3100c0d06caSMauro Carvalho Chehab 	{0xb6, 0x16, 0x00, 0xcc},
3110c0d06caSMauro Carvalho Chehab 	{0xb6, 0x22, 0x12, 0xcc},
3120c0d06caSMauro Carvalho Chehab 	{0xb6, 0x23, 0x0b, 0xcc},
3130c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x02, 0xcc},
3140c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x39, 0xcc},
3150c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x04, 0xcc},
3160c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x10, 0xcc},
3170c0d06caSMauro Carvalho Chehab 	{0xb9, 0x12, 0x00, 0xcc},
3180c0d06caSMauro Carvalho Chehab 	{0xb9, 0x13, 0x0a, 0xcc},
3190c0d06caSMauro Carvalho Chehab 	{0xb9, 0x14, 0x0a, 0xcc},
3200c0d06caSMauro Carvalho Chehab 	{0xb9, 0x15, 0x0a, 0xcc},
3210c0d06caSMauro Carvalho Chehab 	{0xb9, 0x16, 0x0a, 0xcc},
3220c0d06caSMauro Carvalho Chehab 	{0xb9, 0x18, 0x00, 0xcc},
3230c0d06caSMauro Carvalho Chehab 	{0xb9, 0x19, 0x0f, 0xcc},
3240c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1a, 0x0f, 0xcc},
3250c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1b, 0x0f, 0xcc},
3260c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1c, 0x0f, 0xcc},
3270c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},
3280c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8f, 0xff, 0xcc},
3290c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0xf8, 0xcc},
3300c0d06caSMauro Carvalho Chehab 	{0xb6, 0x13, 0x13, 0xcc},
3310c0d06caSMauro Carvalho Chehab 	{0xbc, 0x02, 0x18, 0xcc},
3320c0d06caSMauro Carvalho Chehab 	{0xbc, 0x03, 0x50, 0xcc},
3330c0d06caSMauro Carvalho Chehab 	{0xbc, 0x04, 0x18, 0xcc},
3340c0d06caSMauro Carvalho Chehab 	{0xbc, 0x05, 0x00, 0xcc},
3350c0d06caSMauro Carvalho Chehab 	{0xbc, 0x06, 0x00, 0xcc},
3360c0d06caSMauro Carvalho Chehab 	{0xbc, 0x08, 0x30, 0xcc},
3370c0d06caSMauro Carvalho Chehab 	{0xbc, 0x09, 0x40, 0xcc},
3380c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0a, 0x10, 0xcc},
3390c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0c, 0x20, 0xcc},
3400c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0d, 0x70, 0xcc},
3410c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0b, 0x00, 0xcc},
3420c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0c, 0x00, 0xcc},
3430c0d06caSMauro Carvalho Chehab 	{0x35, 0x00, 0xef, 0xbb},
3440c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
3450c0d06caSMauro Carvalho Chehab 	{}
3460c0d06caSMauro Carvalho Chehab };
3470c0d06caSMauro Carvalho Chehab 
3480c0d06caSMauro Carvalho Chehab static const u8 mi1310_socinitVGA_JPG[][4] = {
3490c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
3500c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
3510c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x64, 0xcc},
3520c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x65, 0xcc},
3530c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x00, 0xcc},
3540c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x00, 0xcc},
3550c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
3560c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
3570c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x02, 0xcc},
3580c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xdd, 0xcc},	/* i2c add: 5d */
3590c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x00, 0xcc},
3600c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0a, 0xcc},
3610c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},
3620c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
3630c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
3640c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x03, 0xcc},
3650c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xc0, 0xcc},
3660c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
3670c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
3680c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x04, 0xcc},
3690c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0xff, 0xcc},
3700c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x65, 0xcc},
3710c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x00, 0xcc},
3720c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0xd0, 0xcc},
3730c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},
3740c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
3750c0d06caSMauro Carvalho Chehab 	{0xc8, 0x9f, 0x0b, 0xbb},
3760c0d06caSMauro Carvalho Chehab 	{0x5b, 0x00, 0x01, 0xbb},
3770c0d06caSMauro Carvalho Chehab 	{0x2f, 0xde, 0x20, 0xbb},
3780c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
3790c0d06caSMauro Carvalho Chehab 	{0x20, 0x03, 0x02, 0xbb},	/* h/v flip */
3800c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
3810c0d06caSMauro Carvalho Chehab 	{0x05, 0x00, 0x07, 0xbb},
3820c0d06caSMauro Carvalho Chehab 	{0x34, 0x00, 0x00, 0xbb},
3830c0d06caSMauro Carvalho Chehab 	{0x35, 0xff, 0x00, 0xbb},
3840c0d06caSMauro Carvalho Chehab 	{0xdc, 0x07, 0x02, 0xbb},
3850c0d06caSMauro Carvalho Chehab 	{0xdd, 0x3c, 0x18, 0xbb},
3860c0d06caSMauro Carvalho Chehab 	{0xde, 0x92, 0x6d, 0xbb},
3870c0d06caSMauro Carvalho Chehab 	{0xdf, 0xcd, 0xb1, 0xbb},
3880c0d06caSMauro Carvalho Chehab 	{0xe0, 0xff, 0xe7, 0xbb},
3890c0d06caSMauro Carvalho Chehab 	{0x06, 0xf0, 0x0d, 0xbb},
3900c0d06caSMauro Carvalho Chehab 	{0x06, 0x70, 0x0e, 0xbb},
3910c0d06caSMauro Carvalho Chehab 	{0x4c, 0x00, 0x01, 0xbb},
3920c0d06caSMauro Carvalho Chehab 	{0x4d, 0x00, 0x01, 0xbb},
3930c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
3940c0d06caSMauro Carvalho Chehab 	{0x2e, 0x0c, 0x55, 0xbb},
3950c0d06caSMauro Carvalho Chehab 	{0x21, 0xb6, 0x6e, 0xbb},
3960c0d06caSMauro Carvalho Chehab 	{0x36, 0x30, 0x10, 0xbb},
3970c0d06caSMauro Carvalho Chehab 	{0x37, 0x00, 0xc1, 0xbb},
3980c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
3990c0d06caSMauro Carvalho Chehab 	{0x07, 0x00, 0x84, 0xbb},
4000c0d06caSMauro Carvalho Chehab 	{0x08, 0x02, 0x4a, 0xbb},
4010c0d06caSMauro Carvalho Chehab 	{0x05, 0x01, 0x10, 0xbb},
4020c0d06caSMauro Carvalho Chehab 	{0x06, 0x00, 0x39, 0xbb},
4030c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
4040c0d06caSMauro Carvalho Chehab 	{0x58, 0x02, 0x67, 0xbb},
4050c0d06caSMauro Carvalho Chehab 	{0x57, 0x02, 0x00, 0xbb},
4060c0d06caSMauro Carvalho Chehab 	{0x5a, 0x02, 0x67, 0xbb},
4070c0d06caSMauro Carvalho Chehab 	{0x59, 0x02, 0x00, 0xbb},
4080c0d06caSMauro Carvalho Chehab 	{0x5c, 0x12, 0x0d, 0xbb},
4090c0d06caSMauro Carvalho Chehab 	{0x5d, 0x16, 0x11, 0xbb},
4100c0d06caSMauro Carvalho Chehab 	{0x39, 0x06, 0x18, 0xbb},
4110c0d06caSMauro Carvalho Chehab 	{0x3a, 0x06, 0x18, 0xbb},
4120c0d06caSMauro Carvalho Chehab 	{0x3b, 0x06, 0x18, 0xbb},
4130c0d06caSMauro Carvalho Chehab 	{0x3c, 0x06, 0x18, 0xbb},
4140c0d06caSMauro Carvalho Chehab 	{0x64, 0x7b, 0x5b, 0xbb},
4150c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
4160c0d06caSMauro Carvalho Chehab 	{0x36, 0x30, 0x10, 0xbb},
4170c0d06caSMauro Carvalho Chehab 	{0x37, 0x00, 0xc0, 0xbb},
4180c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0e, 0x00, 0xcc},
4190c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0f, 0x05, 0xcc},
4200c0d06caSMauro Carvalho Chehab 	{0xbc, 0x10, 0xc0, 0xcc},
4210c0d06caSMauro Carvalho Chehab 	{0xbc, 0x11, 0x03, 0xcc},
4220c0d06caSMauro Carvalho Chehab 	{0xb6, 0x00, 0x00, 0xcc},
4230c0d06caSMauro Carvalho Chehab 	{0xb6, 0x03, 0x02, 0xcc},
4240c0d06caSMauro Carvalho Chehab 	{0xb6, 0x02, 0x80, 0xcc},
4250c0d06caSMauro Carvalho Chehab 	{0xb6, 0x05, 0x01, 0xcc},
4260c0d06caSMauro Carvalho Chehab 	{0xb6, 0x04, 0xe0, 0xcc},
4270c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0xf8, 0xcc},
4280c0d06caSMauro Carvalho Chehab 	{0xb6, 0x13, 0x25, 0xcc},
4290c0d06caSMauro Carvalho Chehab 	{0xb6, 0x18, 0x02, 0xcc},
4300c0d06caSMauro Carvalho Chehab 	{0xb6, 0x17, 0x58, 0xcc},
4310c0d06caSMauro Carvalho Chehab 	{0xb6, 0x16, 0x00, 0xcc},
4320c0d06caSMauro Carvalho Chehab 	{0xb6, 0x22, 0x12, 0xcc},
4330c0d06caSMauro Carvalho Chehab 	{0xb6, 0x23, 0x0b, 0xcc},
4340c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x39, 0xcc},
4350c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x04, 0xcc},
4360c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x00, 0xcc},
4370c0d06caSMauro Carvalho Chehab 	{0xbc, 0x02, 0x18, 0xcc},
4380c0d06caSMauro Carvalho Chehab 	{0xbc, 0x03, 0x50, 0xcc},
4390c0d06caSMauro Carvalho Chehab 	{0xbc, 0x04, 0x18, 0xcc},
4400c0d06caSMauro Carvalho Chehab 	{0xbc, 0x05, 0x00, 0xcc},
4410c0d06caSMauro Carvalho Chehab 	{0xbc, 0x06, 0x00, 0xcc},
4420c0d06caSMauro Carvalho Chehab 	{0xbc, 0x08, 0x30, 0xcc},
4430c0d06caSMauro Carvalho Chehab 	{0xbc, 0x09, 0x40, 0xcc},
4440c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0a, 0x10, 0xcc},
4450c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0b, 0x00, 0xcc},
4460c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0c, 0x00, 0xcc},
4470c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
4480c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
4490c0d06caSMauro Carvalho Chehab 	{0x80, 0x00, 0x03, 0xbb},
4500c0d06caSMauro Carvalho Chehab 	{0x81, 0xc7, 0x14, 0xbb},
4510c0d06caSMauro Carvalho Chehab 	{0x82, 0xeb, 0xe8, 0xbb},
4520c0d06caSMauro Carvalho Chehab 	{0x83, 0xfe, 0xf4, 0xbb},
4530c0d06caSMauro Carvalho Chehab 	{0x84, 0xcd, 0x10, 0xbb},
4540c0d06caSMauro Carvalho Chehab 	{0x85, 0xf3, 0xee, 0xbb},
4550c0d06caSMauro Carvalho Chehab 	{0x86, 0xff, 0xf1, 0xbb},
4560c0d06caSMauro Carvalho Chehab 	{0x87, 0xcd, 0x10, 0xbb},
4570c0d06caSMauro Carvalho Chehab 	{0x88, 0xf3, 0xee, 0xbb},
4580c0d06caSMauro Carvalho Chehab 	{0x89, 0x01, 0xf1, 0xbb},
4590c0d06caSMauro Carvalho Chehab 	{0x8a, 0xe5, 0x17, 0xbb},
4600c0d06caSMauro Carvalho Chehab 	{0x8b, 0xe8, 0xe2, 0xbb},
4610c0d06caSMauro Carvalho Chehab 	{0x8c, 0xf7, 0xed, 0xbb},
4620c0d06caSMauro Carvalho Chehab 	{0x8d, 0x00, 0xff, 0xbb},
4630c0d06caSMauro Carvalho Chehab 	{0x8e, 0xec, 0x10, 0xbb},
4640c0d06caSMauro Carvalho Chehab 	{0x8f, 0xf0, 0xed, 0xbb},
4650c0d06caSMauro Carvalho Chehab 	{0x90, 0xf9, 0xf2, 0xbb},
4660c0d06caSMauro Carvalho Chehab 	{0x91, 0x00, 0x00, 0xbb},
4670c0d06caSMauro Carvalho Chehab 	{0x92, 0xe9, 0x0d, 0xbb},
4680c0d06caSMauro Carvalho Chehab 	{0x93, 0xf4, 0xf2, 0xbb},
4690c0d06caSMauro Carvalho Chehab 	{0x94, 0xfb, 0xf5, 0xbb},
4700c0d06caSMauro Carvalho Chehab 	{0x95, 0x00, 0xff, 0xbb},
4710c0d06caSMauro Carvalho Chehab 	{0xb6, 0x0f, 0x08, 0xbb},
4720c0d06caSMauro Carvalho Chehab 	{0xb7, 0x3d, 0x16, 0xbb},
4730c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0c, 0x04, 0xbb},
4740c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1c, 0x07, 0xbb},
4750c0d06caSMauro Carvalho Chehab 	{0xba, 0x0a, 0x03, 0xbb},
4760c0d06caSMauro Carvalho Chehab 	{0xbb, 0x1b, 0x09, 0xbb},
4770c0d06caSMauro Carvalho Chehab 	{0xbc, 0x17, 0x0d, 0xbb},
4780c0d06caSMauro Carvalho Chehab 	{0xbd, 0x23, 0x1d, 0xbb},
4790c0d06caSMauro Carvalho Chehab 	{0xbe, 0x00, 0x28, 0xbb},
4800c0d06caSMauro Carvalho Chehab 	{0xbf, 0x11, 0x09, 0xbb},
4810c0d06caSMauro Carvalho Chehab 	{0xc0, 0x16, 0x15, 0xbb},
4820c0d06caSMauro Carvalho Chehab 	{0xc1, 0x00, 0x1b, 0xbb},
4830c0d06caSMauro Carvalho Chehab 	{0xc2, 0x0e, 0x07, 0xbb},
4840c0d06caSMauro Carvalho Chehab 	{0xc3, 0x14, 0x10, 0xbb},
4850c0d06caSMauro Carvalho Chehab 	{0xc4, 0x00, 0x17, 0xbb},
4860c0d06caSMauro Carvalho Chehab 	{0x06, 0x74, 0x8e, 0xbb},
4870c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
4880c0d06caSMauro Carvalho Chehab 	{0x06, 0xf4, 0x8e, 0xbb},
4890c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x50, 0xdd},
4900c0d06caSMauro Carvalho Chehab 	{0x06, 0x74, 0x8e, 0xbb},
4910c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
4920c0d06caSMauro Carvalho Chehab 	{0x24, 0x50, 0x20, 0xbb},
4930c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
4940c0d06caSMauro Carvalho Chehab 	{0x34, 0x0c, 0x50, 0xbb},
4950c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
4960c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
4970c0d06caSMauro Carvalho Chehab 	{0x03, 0x03, 0xc0, 0xbb},
4980c0d06caSMauro Carvalho Chehab 	{},
4990c0d06caSMauro Carvalho Chehab };
5000c0d06caSMauro Carvalho Chehab static const u8 mi1310_socinitQVGA_JPG[][4] = {
5010c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},	{0xb0, 0x04, 0x02, 0xcc},
5020c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x64, 0xcc},	{0xb3, 0x00, 0x65, 0xcc},
5030c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x00, 0xcc},	{0xb3, 0x06, 0x00, 0xcc},
5040c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},	{0xb3, 0x09, 0x0c, 0xcc},
5050c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x02, 0xcc},	{0xb3, 0x35, 0xdd, 0xcc},
5060c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x00, 0xcc},	{0xb3, 0x03, 0x0a, 0xcc},
5070c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},	{0xb3, 0x20, 0x00, 0xcc},
5080c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},	{0xb3, 0x22, 0x03, 0xcc},
5090c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xc0, 0xcc},	{0xb3, 0x14, 0x00, 0xcc},
5100c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},	{0xb3, 0x16, 0x04, 0xcc},
5110c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0xff, 0xcc},	{0xb3, 0x00, 0x65, 0xcc},
5120c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x00, 0xcc},	{0xbc, 0x00, 0xf0, 0xcc},
5130c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},	{0xf0, 0x00, 0x02, 0xbb},
5140c0d06caSMauro Carvalho Chehab 	{0xc8, 0x9f, 0x0b, 0xbb},	{0x5b, 0x00, 0x01, 0xbb},
5150c0d06caSMauro Carvalho Chehab 	{0x2f, 0xde, 0x20, 0xbb},	{0xf0, 0x00, 0x00, 0xbb},
5160c0d06caSMauro Carvalho Chehab 	{0x20, 0x03, 0x02, 0xbb},	/* h/v flip */
5170c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
5180c0d06caSMauro Carvalho Chehab 	{0x05, 0x00, 0x07, 0xbb},	{0x34, 0x00, 0x00, 0xbb},
5190c0d06caSMauro Carvalho Chehab 	{0x35, 0xff, 0x00, 0xbb},	{0xdc, 0x07, 0x02, 0xbb},
5200c0d06caSMauro Carvalho Chehab 	{0xdd, 0x3c, 0x18, 0xbb},	{0xde, 0x92, 0x6d, 0xbb},
5210c0d06caSMauro Carvalho Chehab 	{0xdf, 0xcd, 0xb1, 0xbb},	{0xe0, 0xff, 0xe7, 0xbb},
5220c0d06caSMauro Carvalho Chehab 	{0x06, 0xf0, 0x0d, 0xbb},	{0x06, 0x70, 0x0e, 0xbb},
5230c0d06caSMauro Carvalho Chehab 	{0x4c, 0x00, 0x01, 0xbb},	{0x4d, 0x00, 0x01, 0xbb},
5240c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},	{0x2e, 0x0c, 0x55, 0xbb},
5250c0d06caSMauro Carvalho Chehab 	{0x21, 0xb6, 0x6e, 0xbb},	{0x36, 0x30, 0x10, 0xbb},
5260c0d06caSMauro Carvalho Chehab 	{0x37, 0x00, 0xc1, 0xbb},	{0xf0, 0x00, 0x00, 0xbb},
5270c0d06caSMauro Carvalho Chehab 	{0x07, 0x00, 0x84, 0xbb},	{0x08, 0x02, 0x4a, 0xbb},
5280c0d06caSMauro Carvalho Chehab 	{0x05, 0x01, 0x10, 0xbb},	{0x06, 0x00, 0x39, 0xbb},
5290c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},	{0x58, 0x02, 0x67, 0xbb},
5300c0d06caSMauro Carvalho Chehab 	{0x57, 0x02, 0x00, 0xbb},	{0x5a, 0x02, 0x67, 0xbb},
5310c0d06caSMauro Carvalho Chehab 	{0x59, 0x02, 0x00, 0xbb},	{0x5c, 0x12, 0x0d, 0xbb},
5320c0d06caSMauro Carvalho Chehab 	{0x5d, 0x16, 0x11, 0xbb},	{0x39, 0x06, 0x18, 0xbb},
5330c0d06caSMauro Carvalho Chehab 	{0x3a, 0x06, 0x18, 0xbb},	{0x3b, 0x06, 0x18, 0xbb},
5340c0d06caSMauro Carvalho Chehab 	{0x3c, 0x06, 0x18, 0xbb},	{0x64, 0x7b, 0x5b, 0xbb},
5350c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},	{0x36, 0x30, 0x10, 0xbb},
5360c0d06caSMauro Carvalho Chehab 	{0x37, 0x00, 0xc0, 0xbb},	{0xbc, 0x0e, 0x00, 0xcc},
5370c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0f, 0x05, 0xcc},	{0xbc, 0x10, 0xc0, 0xcc},
5380c0d06caSMauro Carvalho Chehab 	{0xbc, 0x11, 0x03, 0xcc},	{0xb6, 0x00, 0x00, 0xcc},
5390c0d06caSMauro Carvalho Chehab 	{0xb6, 0x03, 0x01, 0xcc},	{0xb6, 0x02, 0x40, 0xcc},
5400c0d06caSMauro Carvalho Chehab 	{0xb6, 0x05, 0x00, 0xcc},	{0xb6, 0x04, 0xf0, 0xcc},
5410c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0xf8, 0xcc},	{0xb6, 0x13, 0x25, 0xcc},
5420c0d06caSMauro Carvalho Chehab 	{0xb6, 0x18, 0x00, 0xcc},	{0xb6, 0x17, 0x96, 0xcc},
5430c0d06caSMauro Carvalho Chehab 	{0xb6, 0x16, 0x00, 0xcc},	{0xb6, 0x22, 0x12, 0xcc},
5440c0d06caSMauro Carvalho Chehab 	{0xb6, 0x23, 0x0b, 0xcc},	{0xbf, 0xc0, 0x39, 0xcc},
5450c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x04, 0xcc},	{0xbf, 0xcc, 0x00, 0xcc},
5460c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},	{0xf0, 0x00, 0x01, 0xbb},
5470c0d06caSMauro Carvalho Chehab 	{0x80, 0x00, 0x03, 0xbb},	{0x81, 0xc7, 0x14, 0xbb},
5480c0d06caSMauro Carvalho Chehab 	{0x82, 0xeb, 0xe8, 0xbb},	{0x83, 0xfe, 0xf4, 0xbb},
5490c0d06caSMauro Carvalho Chehab 	{0x84, 0xcd, 0x10, 0xbb},	{0x85, 0xf3, 0xee, 0xbb},
5500c0d06caSMauro Carvalho Chehab 	{0x86, 0xff, 0xf1, 0xbb},	{0x87, 0xcd, 0x10, 0xbb},
5510c0d06caSMauro Carvalho Chehab 	{0x88, 0xf3, 0xee, 0xbb},	{0x89, 0x01, 0xf1, 0xbb},
5520c0d06caSMauro Carvalho Chehab 	{0x8a, 0xe5, 0x17, 0xbb},	{0x8b, 0xe8, 0xe2, 0xbb},
5530c0d06caSMauro Carvalho Chehab 	{0x8c, 0xf7, 0xed, 0xbb},	{0x8d, 0x00, 0xff, 0xbb},
5540c0d06caSMauro Carvalho Chehab 	{0x8e, 0xec, 0x10, 0xbb},	{0x8f, 0xf0, 0xed, 0xbb},
5550c0d06caSMauro Carvalho Chehab 	{0x90, 0xf9, 0xf2, 0xbb},	{0x91, 0x00, 0x00, 0xbb},
5560c0d06caSMauro Carvalho Chehab 	{0x92, 0xe9, 0x0d, 0xbb},	{0x93, 0xf4, 0xf2, 0xbb},
5570c0d06caSMauro Carvalho Chehab 	{0x94, 0xfb, 0xf5, 0xbb},	{0x95, 0x00, 0xff, 0xbb},
5580c0d06caSMauro Carvalho Chehab 	{0xb6, 0x0f, 0x08, 0xbb},	{0xb7, 0x3d, 0x16, 0xbb},
5590c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0c, 0x04, 0xbb},	{0xb9, 0x1c, 0x07, 0xbb},
5600c0d06caSMauro Carvalho Chehab 	{0xba, 0x0a, 0x03, 0xbb},	{0xbb, 0x1b, 0x09, 0xbb},
5610c0d06caSMauro Carvalho Chehab 	{0xbc, 0x17, 0x0d, 0xbb},	{0xbd, 0x23, 0x1d, 0xbb},
5620c0d06caSMauro Carvalho Chehab 	{0xbe, 0x00, 0x28, 0xbb},	{0xbf, 0x11, 0x09, 0xbb},
5630c0d06caSMauro Carvalho Chehab 	{0xc0, 0x16, 0x15, 0xbb},	{0xc1, 0x00, 0x1b, 0xbb},
5640c0d06caSMauro Carvalho Chehab 	{0xc2, 0x0e, 0x07, 0xbb},	{0xc3, 0x14, 0x10, 0xbb},
5650c0d06caSMauro Carvalho Chehab 	{0xc4, 0x00, 0x17, 0xbb},	{0x06, 0x74, 0x8e, 0xbb},
5660c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},	{0x06, 0xf4, 0x8e, 0xbb},
5670c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x50, 0xdd},	{0x06, 0x74, 0x8e, 0xbb},
5680c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},	{0x24, 0x50, 0x20, 0xbb},
5690c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},	{0x34, 0x0c, 0x50, 0xbb},
5700c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},	{0xf0, 0x00, 0x00, 0xbb},
5710c0d06caSMauro Carvalho Chehab 	{0x03, 0x03, 0xc0, 0xbb},
5720c0d06caSMauro Carvalho Chehab 	{},
5730c0d06caSMauro Carvalho Chehab };
5740c0d06caSMauro Carvalho Chehab static const u8 mi1310_soc_InitSXGA_JPG[][4] = {
5750c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
5760c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
5770c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x64, 0xcc},
5780c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x65, 0xcc},
5790c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x00, 0xcc},
5800c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x00, 0xcc},
5810c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
5820c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
5830c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x02, 0xcc},
5840c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xdd, 0xcc},
5850c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x00, 0xcc},
5860c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0a, 0xcc},
5870c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x0d, 0xcc},
5880c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
5890c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
5900c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x03, 0xcc},
5910c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xc0, 0xcc},
5920c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
5930c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
5940c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x04, 0xcc},
5950c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0xff, 0xcc},
5960c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x65, 0xcc},
5970c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x00, 0xcc},
5980c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0x70, 0xcc},
5990c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},
6000c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
6010c0d06caSMauro Carvalho Chehab 	{0xc8, 0x9f, 0x0b, 0xbb},
6020c0d06caSMauro Carvalho Chehab 	{0x5b, 0x00, 0x01, 0xbb},
6030c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
6040c0d06caSMauro Carvalho Chehab 	{0x20, 0x03, 0x02, 0xbb},	/* h/v flip */
6050c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
6060c0d06caSMauro Carvalho Chehab 	{0x05, 0x00, 0x07, 0xbb},
6070c0d06caSMauro Carvalho Chehab 	{0x34, 0x00, 0x00, 0xbb},
6080c0d06caSMauro Carvalho Chehab 	{0x35, 0xff, 0x00, 0xbb},
6090c0d06caSMauro Carvalho Chehab 	{0xdc, 0x07, 0x02, 0xbb},
6100c0d06caSMauro Carvalho Chehab 	{0xdd, 0x3c, 0x18, 0xbb},
6110c0d06caSMauro Carvalho Chehab 	{0xde, 0x92, 0x6d, 0xbb},
6120c0d06caSMauro Carvalho Chehab 	{0xdf, 0xcd, 0xb1, 0xbb},
6130c0d06caSMauro Carvalho Chehab 	{0xe0, 0xff, 0xe7, 0xbb},
6140c0d06caSMauro Carvalho Chehab 	{0x06, 0xf0, 0x0d, 0xbb},
6150c0d06caSMauro Carvalho Chehab 	{0x06, 0x70, 0x0e, 0xbb},
6160c0d06caSMauro Carvalho Chehab 	{0x4c, 0x00, 0x01, 0xbb},
6170c0d06caSMauro Carvalho Chehab 	{0x4d, 0x00, 0x01, 0xbb},
6180c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
6190c0d06caSMauro Carvalho Chehab 	{0x2e, 0x0c, 0x60, 0xbb},
6200c0d06caSMauro Carvalho Chehab 	{0x21, 0xb6, 0x6e, 0xbb},
6210c0d06caSMauro Carvalho Chehab 	{0x37, 0x01, 0x40, 0xbb},
6220c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
6230c0d06caSMauro Carvalho Chehab 	{0x07, 0x00, 0x84, 0xbb},
6240c0d06caSMauro Carvalho Chehab 	{0x08, 0x02, 0x4a, 0xbb},
6250c0d06caSMauro Carvalho Chehab 	{0x05, 0x01, 0x10, 0xbb},
6260c0d06caSMauro Carvalho Chehab 	{0x06, 0x00, 0x39, 0xbb},
6270c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
6280c0d06caSMauro Carvalho Chehab 	{0x58, 0x02, 0x67, 0xbb},
6290c0d06caSMauro Carvalho Chehab 	{0x57, 0x02, 0x00, 0xbb},
6300c0d06caSMauro Carvalho Chehab 	{0x5a, 0x02, 0x67, 0xbb},
6310c0d06caSMauro Carvalho Chehab 	{0x59, 0x02, 0x00, 0xbb},
6320c0d06caSMauro Carvalho Chehab 	{0x5c, 0x12, 0x0d, 0xbb},
6330c0d06caSMauro Carvalho Chehab 	{0x5d, 0x16, 0x11, 0xbb},
6340c0d06caSMauro Carvalho Chehab 	{0x39, 0x06, 0x18, 0xbb},
6350c0d06caSMauro Carvalho Chehab 	{0x3a, 0x06, 0x18, 0xbb},
6360c0d06caSMauro Carvalho Chehab 	{0x3b, 0x06, 0x18, 0xbb},
6370c0d06caSMauro Carvalho Chehab 	{0x3c, 0x06, 0x18, 0xbb},
6380c0d06caSMauro Carvalho Chehab 	{0x64, 0x7b, 0x5b, 0xbb},
6390c0d06caSMauro Carvalho Chehab 	{0xb6, 0x00, 0x00, 0xcc},
6400c0d06caSMauro Carvalho Chehab 	{0xb6, 0x03, 0x05, 0xcc},
6410c0d06caSMauro Carvalho Chehab 	{0xb6, 0x02, 0x00, 0xcc},
6420c0d06caSMauro Carvalho Chehab 	{0xb6, 0x05, 0x03, 0xcc},
6430c0d06caSMauro Carvalho Chehab 	{0xb6, 0x04, 0xc0, 0xcc},
6440c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0xf8, 0xcc},
6450c0d06caSMauro Carvalho Chehab 	{0xb6, 0x13, 0x29, 0xcc},
6460c0d06caSMauro Carvalho Chehab 	{0xb6, 0x18, 0x09, 0xcc},
6470c0d06caSMauro Carvalho Chehab 	{0xb6, 0x17, 0x60, 0xcc},
6480c0d06caSMauro Carvalho Chehab 	{0xb6, 0x16, 0x00, 0xcc},
6490c0d06caSMauro Carvalho Chehab 	{0xb6, 0x22, 0x12, 0xcc},
6500c0d06caSMauro Carvalho Chehab 	{0xb6, 0x23, 0x0b, 0xcc},
6510c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x39, 0xcc},
6520c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x04, 0xcc},
6530c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x00, 0xcc},
6540c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
6550c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x80, 0xdd},
6560c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
6570c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
6580c0d06caSMauro Carvalho Chehab 	{0x22, 0xa0, 0x78, 0xbb},
6590c0d06caSMauro Carvalho Chehab 	{0x23, 0xa0, 0x78, 0xbb},
6600c0d06caSMauro Carvalho Chehab 	{0x24, 0x7f, 0x00, 0xbb},
6610c0d06caSMauro Carvalho Chehab 	{0x28, 0xea, 0x02, 0xbb},
6620c0d06caSMauro Carvalho Chehab 	{0x29, 0x86, 0x7a, 0xbb},
6630c0d06caSMauro Carvalho Chehab 	{0x5e, 0x52, 0x4c, 0xbb},
6640c0d06caSMauro Carvalho Chehab 	{0x5f, 0x20, 0x24, 0xbb},
6650c0d06caSMauro Carvalho Chehab 	{0x60, 0x00, 0x02, 0xbb},
6660c0d06caSMauro Carvalho Chehab 	{0x02, 0x00, 0xee, 0xbb},
6670c0d06caSMauro Carvalho Chehab 	{0x03, 0x39, 0x23, 0xbb},
6680c0d06caSMauro Carvalho Chehab 	{0x04, 0x07, 0x24, 0xbb},
6690c0d06caSMauro Carvalho Chehab 	{0x09, 0x00, 0xc0, 0xbb},
6700c0d06caSMauro Carvalho Chehab 	{0x0a, 0x00, 0x79, 0xbb},
6710c0d06caSMauro Carvalho Chehab 	{0x0b, 0x00, 0x04, 0xbb},
6720c0d06caSMauro Carvalho Chehab 	{0x0c, 0x00, 0x5c, 0xbb},
6730c0d06caSMauro Carvalho Chehab 	{0x0d, 0x00, 0xd9, 0xbb},
6740c0d06caSMauro Carvalho Chehab 	{0x0e, 0x00, 0x53, 0xbb},
6750c0d06caSMauro Carvalho Chehab 	{0x0f, 0x00, 0x21, 0xbb},
6760c0d06caSMauro Carvalho Chehab 	{0x10, 0x00, 0xa4, 0xbb},
6770c0d06caSMauro Carvalho Chehab 	{0x11, 0x00, 0xe5, 0xbb},
6780c0d06caSMauro Carvalho Chehab 	{0x15, 0x00, 0x00, 0xbb},
6790c0d06caSMauro Carvalho Chehab 	{0x16, 0x00, 0x00, 0xbb},
6800c0d06caSMauro Carvalho Chehab 	{0x17, 0x00, 0x00, 0xbb},
6810c0d06caSMauro Carvalho Chehab 	{0x18, 0x00, 0x00, 0xbb},
6820c0d06caSMauro Carvalho Chehab 	{0x19, 0x00, 0x00, 0xbb},
6830c0d06caSMauro Carvalho Chehab 	{0x1a, 0x00, 0x00, 0xbb},
6840c0d06caSMauro Carvalho Chehab 	{0x1b, 0x00, 0x00, 0xbb},
6850c0d06caSMauro Carvalho Chehab 	{0x1c, 0x00, 0x00, 0xbb},
6860c0d06caSMauro Carvalho Chehab 	{0x1d, 0x00, 0x00, 0xbb},
6870c0d06caSMauro Carvalho Chehab 	{0x1e, 0x00, 0x00, 0xbb},
6880c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
6890c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x20, 0xdd},
6900c0d06caSMauro Carvalho Chehab 	{0x06, 0xf0, 0x8e, 0xbb},
6910c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x80, 0xdd},
6920c0d06caSMauro Carvalho Chehab 	{0x06, 0x70, 0x8e, 0xbb},
6930c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
6940c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x20, 0xdd},
6950c0d06caSMauro Carvalho Chehab 	{0x5e, 0x6a, 0x53, 0xbb},
6960c0d06caSMauro Carvalho Chehab 	{0x5f, 0x40, 0x2c, 0xbb},
6970c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
6980c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x20, 0xdd},
6990c0d06caSMauro Carvalho Chehab 	{0x58, 0x00, 0x00, 0xbb},
7000c0d06caSMauro Carvalho Chehab 	{0x53, 0x09, 0x03, 0xbb},
7010c0d06caSMauro Carvalho Chehab 	{0x54, 0x31, 0x18, 0xbb},
7020c0d06caSMauro Carvalho Chehab 	{0x55, 0x8b, 0x5f, 0xbb},
7030c0d06caSMauro Carvalho Chehab 	{0x56, 0xc0, 0xa9, 0xbb},
7040c0d06caSMauro Carvalho Chehab 	{0x57, 0xe0, 0xd2, 0xbb},
7050c0d06caSMauro Carvalho Chehab 	{0xe1, 0x00, 0x00, 0xbb},
7060c0d06caSMauro Carvalho Chehab 	{0xdc, 0x09, 0x03, 0xbb},
7070c0d06caSMauro Carvalho Chehab 	{0xdd, 0x31, 0x18, 0xbb},
7080c0d06caSMauro Carvalho Chehab 	{0xde, 0x8b, 0x5f, 0xbb},
7090c0d06caSMauro Carvalho Chehab 	{0xdf, 0xc0, 0xa9, 0xbb},
7100c0d06caSMauro Carvalho Chehab 	{0xe0, 0xe0, 0xd2, 0xbb},
7110c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
7120c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
7130c0d06caSMauro Carvalho Chehab 	{0x06, 0xf0, 0x8e, 0xbb},
7140c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
7150c0d06caSMauro Carvalho Chehab 	{0x2f, 0xde, 0x20, 0xbb},
7160c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
7170c0d06caSMauro Carvalho Chehab 	{0x24, 0x50, 0x20, 0xbb},
7180c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0e, 0x00, 0xcc},
7190c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0f, 0x05, 0xcc},
7200c0d06caSMauro Carvalho Chehab 	{0xbc, 0x10, 0xc0, 0xcc},
7210c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
7220c0d06caSMauro Carvalho Chehab 	{0x34, 0x0c, 0x50, 0xbb},
7230c0d06caSMauro Carvalho Chehab 	{0xbc, 0x11, 0x03, 0xcc},
7240c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
7250c0d06caSMauro Carvalho Chehab 	{0x80, 0x00, 0x03, 0xbb},
7260c0d06caSMauro Carvalho Chehab 	{0x81, 0xc7, 0x14, 0xbb},
7270c0d06caSMauro Carvalho Chehab 	{0x82, 0xeb, 0xe8, 0xbb},
7280c0d06caSMauro Carvalho Chehab 	{0x83, 0xfe, 0xf4, 0xbb},
7290c0d06caSMauro Carvalho Chehab 	{0x84, 0xcd, 0x10, 0xbb},
7300c0d06caSMauro Carvalho Chehab 	{0x85, 0xf3, 0xee, 0xbb},
7310c0d06caSMauro Carvalho Chehab 	{0x86, 0xff, 0xf1, 0xbb},
7320c0d06caSMauro Carvalho Chehab 	{0x87, 0xcd, 0x10, 0xbb},
7330c0d06caSMauro Carvalho Chehab 	{0x88, 0xf3, 0xee, 0xbb},
7340c0d06caSMauro Carvalho Chehab 	{0x89, 0x01, 0xf1, 0xbb},
7350c0d06caSMauro Carvalho Chehab 	{0x8a, 0xe5, 0x17, 0xbb},
7360c0d06caSMauro Carvalho Chehab 	{0x8b, 0xe8, 0xe2, 0xbb},
7370c0d06caSMauro Carvalho Chehab 	{0x8c, 0xf7, 0xed, 0xbb},
7380c0d06caSMauro Carvalho Chehab 	{0x8d, 0x00, 0xff, 0xbb},
7390c0d06caSMauro Carvalho Chehab 	{0x8e, 0xec, 0x10, 0xbb},
7400c0d06caSMauro Carvalho Chehab 	{0x8f, 0xf0, 0xed, 0xbb},
7410c0d06caSMauro Carvalho Chehab 	{0x90, 0xf9, 0xf2, 0xbb},
7420c0d06caSMauro Carvalho Chehab 	{0x91, 0x00, 0x00, 0xbb},
7430c0d06caSMauro Carvalho Chehab 	{0x92, 0xe9, 0x0d, 0xbb},
7440c0d06caSMauro Carvalho Chehab 	{0x93, 0xf4, 0xf2, 0xbb},
7450c0d06caSMauro Carvalho Chehab 	{0x94, 0xfb, 0xf5, 0xbb},
7460c0d06caSMauro Carvalho Chehab 	{0x95, 0x00, 0xff, 0xbb},
7470c0d06caSMauro Carvalho Chehab 	{0xb6, 0x0f, 0x08, 0xbb},
7480c0d06caSMauro Carvalho Chehab 	{0xb7, 0x3d, 0x16, 0xbb},
7490c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0c, 0x04, 0xbb},
7500c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1c, 0x07, 0xbb},
7510c0d06caSMauro Carvalho Chehab 	{0xba, 0x0a, 0x03, 0xbb},
7520c0d06caSMauro Carvalho Chehab 	{0xbb, 0x1b, 0x09, 0xbb},
7530c0d06caSMauro Carvalho Chehab 	{0xbc, 0x17, 0x0d, 0xbb},
7540c0d06caSMauro Carvalho Chehab 	{0xbd, 0x23, 0x1d, 0xbb},
7550c0d06caSMauro Carvalho Chehab 	{0xbe, 0x00, 0x28, 0xbb},
7560c0d06caSMauro Carvalho Chehab 	{0xbf, 0x11, 0x09, 0xbb},
7570c0d06caSMauro Carvalho Chehab 	{0xc0, 0x16, 0x15, 0xbb},
7580c0d06caSMauro Carvalho Chehab 	{0xc1, 0x00, 0x1b, 0xbb},
7590c0d06caSMauro Carvalho Chehab 	{0xc2, 0x0e, 0x07, 0xbb},
7600c0d06caSMauro Carvalho Chehab 	{0xc3, 0x14, 0x10, 0xbb},
7610c0d06caSMauro Carvalho Chehab 	{0xc4, 0x00, 0x17, 0xbb},
7620c0d06caSMauro Carvalho Chehab 	{0x06, 0x74, 0x8e, 0xbb},
7630c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
7640c0d06caSMauro Carvalho Chehab 	{0x03, 0x03, 0xc0, 0xbb},
7650c0d06caSMauro Carvalho Chehab 	{}
7660c0d06caSMauro Carvalho Chehab };
7670c0d06caSMauro Carvalho Chehab 
7680c0d06caSMauro Carvalho Chehab static const u8 mi1320_gamma[17] = {
7690c0d06caSMauro Carvalho Chehab 	0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
7700c0d06caSMauro Carvalho Chehab 	0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff
7710c0d06caSMauro Carvalho Chehab };
7720c0d06caSMauro Carvalho Chehab static const u8 mi1320_matrix[9] = {
7730c0d06caSMauro Carvalho Chehab 	0x54, 0xda, 0x06, 0xf1, 0x50, 0xf4, 0xf7, 0xea, 0x52
7740c0d06caSMauro Carvalho Chehab };
7750c0d06caSMauro Carvalho Chehab static const u8 mi1320_initVGA_data[][4] = {
7760c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x01, 0xcc},	{0x00, 0x00, 0x33, 0xdd},
7770c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},	{0x00, 0x00, 0x33, 0xdd},
7780c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},	{0x00, 0x00, 0x33, 0xdd},
7790c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x64, 0xcc},	{0xb3, 0x00, 0x65, 0xcc},
7800c0d06caSMauro Carvalho Chehab 	{0xb0, 0x16, 0x03, 0xcc},	{0xb3, 0x05, 0x00, 0xcc},
7810c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x00, 0xcc},	{0xb3, 0x08, 0x01, 0xcc},
7820c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},	{0xb3, 0x34, 0x02, 0xcc},
7830c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xc8, 0xcc},	/* i2c add: 48 */
7840c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x00, 0xcc},
7850c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0a, 0xcc},	{0xb3, 0x04, 0x05, 0xcc},
7860c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},	{0xb3, 0x21, 0x00, 0xcc},
7870c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x03, 0xcc},	{0xb3, 0x23, 0xc0, 0xcc},
7880c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},	{0xb3, 0x15, 0x00, 0xcc},
7890c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x04, 0xcc},	{0xb3, 0x17, 0xff, 0xcc},
7900c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},	{0xbc, 0x00, 0xd0, 0xcc},
7910c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},	{0xf0, 0x00, 0x00, 0xbb},
7920c0d06caSMauro Carvalho Chehab 	{0x0d, 0x00, 0x09, 0xbb},	{0x00, 0x01, 0x00, 0xdd},
7930c0d06caSMauro Carvalho Chehab 	{0x0d, 0x00, 0x08, 0xbb},	{0xf0, 0x00, 0x01, 0xbb},
7940c0d06caSMauro Carvalho Chehab 	{0xa1, 0x05, 0x00, 0xbb},	{0xa4, 0x03, 0xc0, 0xbb},
7950c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},	{0x00, 0x00, 0x10, 0xdd},
7960c0d06caSMauro Carvalho Chehab 	{0xc8, 0x9f, 0x0b, 0xbb},	{0x00, 0x00, 0x10, 0xdd},
7970c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},	{0x00, 0x00, 0x10, 0xdd},
7980c0d06caSMauro Carvalho Chehab 	{0x20, 0x01, 0x00, 0xbb},	{0x00, 0x00, 0x10, 0xdd},
7990c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},	{0x9d, 0x3c, 0xa0, 0xbb},
8000c0d06caSMauro Carvalho Chehab 	{0x47, 0x30, 0x30, 0xbb},	{0xf0, 0x00, 0x00, 0xbb},
8010c0d06caSMauro Carvalho Chehab 	{0x0a, 0x80, 0x11, 0xbb},	{0x35, 0x00, 0x22, 0xbb},
8020c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},	{0x9d, 0xc5, 0x05, 0xbb},
8030c0d06caSMauro Carvalho Chehab 	{0xdc, 0x0f, 0xfc, 0xbb},	{0xf0, 0x00, 0x01, 0xbb},
8040c0d06caSMauro Carvalho Chehab 	{0x06, 0x74, 0x0e, 0xbb},	{0x80, 0x00, 0x06, 0xbb},
8050c0d06caSMauro Carvalho Chehab 	{0x81, 0x04, 0x00, 0xbb},	{0x82, 0x01, 0x02, 0xbb},
8060c0d06caSMauro Carvalho Chehab 	{0x83, 0x03, 0x02, 0xbb},	{0x84, 0x05, 0x00, 0xbb},
8070c0d06caSMauro Carvalho Chehab 	{0x85, 0x01, 0x00, 0xbb},	{0x86, 0x03, 0x02, 0xbb},
8080c0d06caSMauro Carvalho Chehab 	{0x87, 0x05, 0x00, 0xbb},	{0x88, 0x01, 0x00, 0xbb},
8090c0d06caSMauro Carvalho Chehab 	{0x89, 0x02, 0x02, 0xbb},	{0x8a, 0xfd, 0x04, 0xbb},
8100c0d06caSMauro Carvalho Chehab 	{0x8b, 0xfc, 0xfd, 0xbb},	{0x8c, 0xff, 0xfd, 0xbb},
8110c0d06caSMauro Carvalho Chehab 	{0x8d, 0x00, 0x00, 0xbb},	{0x8e, 0xfe, 0x05, 0xbb},
8120c0d06caSMauro Carvalho Chehab 	{0x8f, 0xfc, 0xfd, 0xbb},	{0x90, 0xfe, 0xfd, 0xbb},
8130c0d06caSMauro Carvalho Chehab 	{0x91, 0x00, 0x00, 0xbb},	{0x92, 0xfe, 0x03, 0xbb},
8140c0d06caSMauro Carvalho Chehab 	{0x93, 0xfd, 0xfe, 0xbb},	{0x94, 0xff, 0xfd, 0xbb},
8150c0d06caSMauro Carvalho Chehab 	{0x95, 0x00, 0x00, 0xbb},	{0xb6, 0x07, 0x05, 0xbb},
8160c0d06caSMauro Carvalho Chehab 	{0xb7, 0x13, 0x06, 0xbb},	{0xb8, 0x08, 0x06, 0xbb},
8170c0d06caSMauro Carvalho Chehab 	{0xb9, 0x14, 0x08, 0xbb},	{0xba, 0x06, 0x05, 0xbb},
8180c0d06caSMauro Carvalho Chehab 	{0xbb, 0x13, 0x06, 0xbb},	{0xbc, 0x03, 0x01, 0xbb},
8190c0d06caSMauro Carvalho Chehab 	{0xbd, 0x03, 0x04, 0xbb},	{0xbe, 0x00, 0x02, 0xbb},
8200c0d06caSMauro Carvalho Chehab 	{0xbf, 0x03, 0x01, 0xbb},	{0xc0, 0x02, 0x04, 0xbb},
8210c0d06caSMauro Carvalho Chehab 	{0xc1, 0x00, 0x04, 0xbb},	{0xc2, 0x02, 0x01, 0xbb},
8220c0d06caSMauro Carvalho Chehab 	{0xc3, 0x01, 0x03, 0xbb},	{0xc4, 0x00, 0x04, 0xbb},
8230c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},	{0x05, 0x01, 0x13, 0xbb},
8240c0d06caSMauro Carvalho Chehab 	{0x06, 0x00, 0x11, 0xbb},	{0x07, 0x00, 0x85, 0xbb},
8250c0d06caSMauro Carvalho Chehab 	{0x08, 0x00, 0x27, 0xbb},
8260c0d06caSMauro Carvalho Chehab 	{0x20, 0x01, 0x00, 0xbb},	/* h/v flips - was 03 */
8270c0d06caSMauro Carvalho Chehab 	{0x21, 0x80, 0x00, 0xbb},	{0x22, 0x0d, 0x0f, 0xbb},
8280c0d06caSMauro Carvalho Chehab 	{0x24, 0x80, 0x00, 0xbb},	{0x59, 0x00, 0xff, 0xbb},
8290c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},	{0x39, 0x03, 0x0d, 0xbb},
8300c0d06caSMauro Carvalho Chehab 	{0x3a, 0x06, 0x1b, 0xbb},	{0x3b, 0x00, 0x95, 0xbb},
8310c0d06caSMauro Carvalho Chehab 	{0x3c, 0x04, 0xdb, 0xbb},	{0x57, 0x02, 0x00, 0xbb},
8320c0d06caSMauro Carvalho Chehab 	{0x58, 0x02, 0x66, 0xbb},	{0x59, 0x00, 0xff, 0xbb},
8330c0d06caSMauro Carvalho Chehab 	{0x5a, 0x01, 0x33, 0xbb},	{0x5c, 0x12, 0x0d, 0xbb},
8340c0d06caSMauro Carvalho Chehab 	{0x5d, 0x16, 0x11, 0xbb},	{0x64, 0x5e, 0x1c, 0xbb},
8350c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},	{0x2f, 0xd1, 0x00, 0xbb},
8360c0d06caSMauro Carvalho Chehab 	{0x5b, 0x00, 0x01, 0xbb},	{0xf0, 0x00, 0x02, 0xbb},
8370c0d06caSMauro Carvalho Chehab 	{0x36, 0x68, 0x10, 0xbb},	{0x00, 0x00, 0x30, 0xdd},
8380c0d06caSMauro Carvalho Chehab 	{0x37, 0x82, 0x00, 0xbb},	{0xbc, 0x0e, 0x00, 0xcc},
8390c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0f, 0x05, 0xcc},	{0xbc, 0x10, 0xc0, 0xcc},
8400c0d06caSMauro Carvalho Chehab 	{0xbc, 0x11, 0x03, 0xcc},	{0xb6, 0x00, 0x00, 0xcc},
8410c0d06caSMauro Carvalho Chehab 	{0xb6, 0x03, 0x05, 0xcc},	{0xb6, 0x02, 0x00, 0xcc},
8420c0d06caSMauro Carvalho Chehab 	{0xb6, 0x05, 0x04, 0xcc},	{0xb6, 0x04, 0x00, 0xcc},
8430c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0xf8, 0xcc},	{0xb6, 0x13, 0x29, 0xcc},
8440c0d06caSMauro Carvalho Chehab 	{0xb6, 0x18, 0x0a, 0xcc},	{0xb6, 0x17, 0x00, 0xcc},
8450c0d06caSMauro Carvalho Chehab 	{0xb6, 0x16, 0x00, 0xcc},	{0xb6, 0x22, 0x12, 0xcc},
8460c0d06caSMauro Carvalho Chehab 	{0xb6, 0x23, 0x0b, 0xcc},	{0xbf, 0xc0, 0x26, 0xcc},
8470c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x02, 0xcc},	{0xbf, 0xcc, 0x04, 0xcc},
8480c0d06caSMauro Carvalho Chehab 	{0xbc, 0x02, 0x18, 0xcc},	{0xbc, 0x03, 0x50, 0xcc},
8490c0d06caSMauro Carvalho Chehab 	{0xbc, 0x04, 0x18, 0xcc},	{0xbc, 0x05, 0x00, 0xcc},
8500c0d06caSMauro Carvalho Chehab 	{0xbc, 0x06, 0x00, 0xcc},	{0xbc, 0x08, 0x30, 0xcc},
8510c0d06caSMauro Carvalho Chehab 	{0xbc, 0x09, 0x40, 0xcc},	{0xbc, 0x0a, 0x10, 0xcc},
8520c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0b, 0x00, 0xcc},	{0xbc, 0x0c, 0x00, 0xcc},
8530c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},	{0xb3, 0x01, 0x41, 0xcc},
8540c0d06caSMauro Carvalho Chehab 	{}
8550c0d06caSMauro Carvalho Chehab };
8560c0d06caSMauro Carvalho Chehab static const u8 mi1320_initQVGA_data[][4] = {
8570c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x01, 0xcc},	{0x00, 0x00, 0x33, 0xdd},
8580c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},	{0x00, 0x00, 0x33, 0xdd},
8590c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},	{0x00, 0x00, 0x33, 0xdd},
8600c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x64, 0xcc},	{0xb3, 0x00, 0x65, 0xcc},
8610c0d06caSMauro Carvalho Chehab 	{0xb0, 0x16, 0x03, 0xcc},	{0xb3, 0x05, 0x01, 0xcc},
8620c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},	{0xb3, 0x08, 0x01, 0xcc},
8630c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},	{0xb3, 0x34, 0x02, 0xcc},
8640c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xc8, 0xcc},	{0xb3, 0x02, 0x00, 0xcc},
8650c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0a, 0xcc},	{0xb3, 0x04, 0x05, 0xcc},
8660c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},	{0xb3, 0x21, 0x00, 0xcc},
8670c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x01, 0xcc},	{0xb3, 0x23, 0xe0, 0xcc},
8680c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},	{0xb3, 0x15, 0x00, 0xcc},
8690c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},	{0xb3, 0x17, 0x7f, 0xcc},
8700c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x65, 0xcc},	{0xb8, 0x00, 0x00, 0xcc},
8710c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0xd0, 0xcc},	{0xbc, 0x01, 0x01, 0xcc},
8720c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},	{0x0d, 0x00, 0x09, 0xbb},
8730c0d06caSMauro Carvalho Chehab 	{0x00, 0x01, 0x00, 0xdd},	{0x0d, 0x00, 0x08, 0xbb},
8740c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},	{0x02, 0x00, 0x64, 0xbb},
8750c0d06caSMauro Carvalho Chehab 	{0x05, 0x01, 0x78, 0xbb},	{0x06, 0x00, 0x11, 0xbb},
8760c0d06caSMauro Carvalho Chehab 	{0x07, 0x01, 0x42, 0xbb},	{0x08, 0x00, 0x11, 0xbb},
8770c0d06caSMauro Carvalho Chehab 	{0x20, 0x01, 0x00, 0xbb},	{0x21, 0x80, 0x00, 0xbb},
8780c0d06caSMauro Carvalho Chehab 	{0x22, 0x0d, 0x0f, 0xbb},	{0x24, 0x80, 0x00, 0xbb},
8790c0d06caSMauro Carvalho Chehab 	{0x59, 0x00, 0xff, 0xbb},	{0xf0, 0x00, 0x01, 0xbb},
8800c0d06caSMauro Carvalho Chehab 	{0x9d, 0x3c, 0xa0, 0xbb},	{0x47, 0x30, 0x30, 0xbb},
8810c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},	{0x0a, 0x80, 0x11, 0xbb},
8820c0d06caSMauro Carvalho Chehab 	{0x35, 0x00, 0x22, 0xbb},	{0xf0, 0x00, 0x02, 0xbb},
8830c0d06caSMauro Carvalho Chehab 	{0x9d, 0xc5, 0x05, 0xbb},	{0xdc, 0x0f, 0xfc, 0xbb},
8840c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},	{0x06, 0x74, 0x0e, 0xbb},
8850c0d06caSMauro Carvalho Chehab 	{0x80, 0x00, 0x06, 0xbb},	{0x81, 0x04, 0x00, 0xbb},
8860c0d06caSMauro Carvalho Chehab 	{0x82, 0x01, 0x02, 0xbb},	{0x83, 0x03, 0x02, 0xbb},
8870c0d06caSMauro Carvalho Chehab 	{0x84, 0x05, 0x00, 0xbb},	{0x85, 0x01, 0x00, 0xbb},
8880c0d06caSMauro Carvalho Chehab 	{0x86, 0x03, 0x02, 0xbb},	{0x87, 0x05, 0x00, 0xbb},
8890c0d06caSMauro Carvalho Chehab 	{0x88, 0x01, 0x00, 0xbb},	{0x89, 0x02, 0x02, 0xbb},
8900c0d06caSMauro Carvalho Chehab 	{0x8a, 0xfd, 0x04, 0xbb},	{0x8b, 0xfc, 0xfd, 0xbb},
8910c0d06caSMauro Carvalho Chehab 	{0x8c, 0xff, 0xfd, 0xbb},	{0x8d, 0x00, 0x00, 0xbb},
8920c0d06caSMauro Carvalho Chehab 	{0x8e, 0xfe, 0x05, 0xbb},	{0x8f, 0xfc, 0xfd, 0xbb},
8930c0d06caSMauro Carvalho Chehab 	{0x90, 0xfe, 0xfd, 0xbb},	{0x91, 0x00, 0x00, 0xbb},
8940c0d06caSMauro Carvalho Chehab 	{0x92, 0xfe, 0x03, 0xbb},	{0x93, 0xfd, 0xfe, 0xbb},
8950c0d06caSMauro Carvalho Chehab 	{0x94, 0xff, 0xfd, 0xbb},	{0x95, 0x00, 0x00, 0xbb},
8960c0d06caSMauro Carvalho Chehab 	{0xb6, 0x07, 0x05, 0xbb},	{0xb7, 0x13, 0x06, 0xbb},
8970c0d06caSMauro Carvalho Chehab 	{0xb8, 0x08, 0x06, 0xbb},	{0xb9, 0x14, 0x08, 0xbb},
8980c0d06caSMauro Carvalho Chehab 	{0xba, 0x06, 0x05, 0xbb},	{0xbb, 0x13, 0x06, 0xbb},
8990c0d06caSMauro Carvalho Chehab 	{0xbc, 0x03, 0x01, 0xbb},	{0xbd, 0x03, 0x04, 0xbb},
9000c0d06caSMauro Carvalho Chehab 	{0xbe, 0x00, 0x02, 0xbb},	{0xbf, 0x03, 0x01, 0xbb},
9010c0d06caSMauro Carvalho Chehab 	{0xc0, 0x02, 0x04, 0xbb},	{0xc1, 0x00, 0x04, 0xbb},
9020c0d06caSMauro Carvalho Chehab 	{0xc2, 0x02, 0x01, 0xbb},	{0xc3, 0x01, 0x03, 0xbb},
9030c0d06caSMauro Carvalho Chehab 	{0xc4, 0x00, 0x04, 0xbb},	{0xf0, 0x00, 0x02, 0xbb},
9040c0d06caSMauro Carvalho Chehab 	{0xc8, 0x00, 0x00, 0xbb},	{0x2e, 0x00, 0x00, 0xbb},
9050c0d06caSMauro Carvalho Chehab 	{0x2e, 0x0c, 0x5b, 0xbb},	{0x2f, 0xd1, 0x00, 0xbb},
9060c0d06caSMauro Carvalho Chehab 	{0x39, 0x03, 0xca, 0xbb},	{0x3a, 0x06, 0x80, 0xbb},
9070c0d06caSMauro Carvalho Chehab 	{0x3b, 0x01, 0x52, 0xbb},	{0x3c, 0x05, 0x40, 0xbb},
9080c0d06caSMauro Carvalho Chehab 	{0x57, 0x01, 0x9c, 0xbb},	{0x58, 0x01, 0xee, 0xbb},
9090c0d06caSMauro Carvalho Chehab 	{0x59, 0x00, 0xf0, 0xbb},	{0x5a, 0x01, 0x20, 0xbb},
9100c0d06caSMauro Carvalho Chehab 	{0x5c, 0x1d, 0x17, 0xbb},	{0x5d, 0x22, 0x1c, 0xbb},
9110c0d06caSMauro Carvalho Chehab 	{0x64, 0x1e, 0x1c, 0xbb},	{0x5b, 0x00, 0x01, 0xbb},
9120c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},	{0x36, 0x68, 0x10, 0xbb},
9130c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x30, 0xdd},	{0x37, 0x81, 0x00, 0xbb},
9140c0d06caSMauro Carvalho Chehab 	{0xbc, 0x02, 0x18, 0xcc},	{0xbc, 0x03, 0x50, 0xcc},
9150c0d06caSMauro Carvalho Chehab 	{0xbc, 0x04, 0x18, 0xcc},	{0xbc, 0x05, 0x00, 0xcc},
9160c0d06caSMauro Carvalho Chehab 	{0xbc, 0x06, 0x00, 0xcc},	{0xbc, 0x08, 0x30, 0xcc},
9170c0d06caSMauro Carvalho Chehab 	{0xbc, 0x09, 0x40, 0xcc},	{0xbc, 0x0a, 0x10, 0xcc},
9180c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0b, 0x00, 0xcc},	{0xbc, 0x0c, 0x00, 0xcc},
9190c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x26, 0xcc},	{0xbf, 0xc1, 0x02, 0xcc},
9200c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x04, 0xcc},	{0xb3, 0x5c, 0x01, 0xcc},
9210c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
9220c0d06caSMauro Carvalho Chehab 	{}
9230c0d06caSMauro Carvalho Chehab };
9240c0d06caSMauro Carvalho Chehab 
9250c0d06caSMauro Carvalho Chehab static const u8 mi1320_soc_InitVGA[][4] = {
9260c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x01, 0xcc},
9270c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
9280c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
9290c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x30, 0xdd},
9300c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x64, 0xcc},
9310c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
9320c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
9330c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},
9340c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
9350c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
9360c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x02, 0xcc},
9370c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xc8, 0xcc},	/* i2c add: 48 */
9380c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x00, 0xcc},
9390c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0a, 0xcc},
9400c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},
9410c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
9420c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
9430c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x01, 0xcc},
9440c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},
9450c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
9460c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
9470c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},
9480c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x7f, 0xcc},
9490c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
9500c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x00, 0xcc},
9510c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0x71, 0xcc},
9520c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},
9530c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
9540c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
9550c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
9560c0d06caSMauro Carvalho Chehab 	{0xc8, 0x00, 0x00, 0xbb},
9570c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x30, 0xdd},
9580c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
9590c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
9600c0d06caSMauro Carvalho Chehab 	{0x07, 0x00, 0xe0, 0xbb},
9610c0d06caSMauro Carvalho Chehab 	{0x08, 0x00, 0x0b, 0xbb},
9620c0d06caSMauro Carvalho Chehab 	{0x21, 0x00, 0x0c, 0xbb},
9630c0d06caSMauro Carvalho Chehab 	{0x20, 0x01, 0x03, 0xbb},	/* h/v flip */
9640c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x26, 0xcc},
9650c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x02, 0xcc},
9660c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x04, 0xcc},
9670c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
9680c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
9690c0d06caSMauro Carvalho Chehab 	{0x05, 0x01, 0x78, 0xbb},
9700c0d06caSMauro Carvalho Chehab 	{0x06, 0x00, 0x11, 0xbb},
9710c0d06caSMauro Carvalho Chehab 	{0x07, 0x01, 0x42, 0xbb},
9720c0d06caSMauro Carvalho Chehab 	{0x08, 0x00, 0x11, 0xbb},
9730c0d06caSMauro Carvalho Chehab 	{0x20, 0x01, 0x03, 0xbb},	/* h/v flip */
9740c0d06caSMauro Carvalho Chehab 	{0x21, 0x80, 0x00, 0xbb},
9750c0d06caSMauro Carvalho Chehab 	{0x22, 0x0d, 0x0f, 0xbb},
9760c0d06caSMauro Carvalho Chehab 	{0x24, 0x80, 0x00, 0xbb},
9770c0d06caSMauro Carvalho Chehab 	{0x59, 0x00, 0xff, 0xbb},
9780c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
9790c0d06caSMauro Carvalho Chehab 	{0x39, 0x03, 0xca, 0xbb},
9800c0d06caSMauro Carvalho Chehab 	{0x3a, 0x06, 0x80, 0xbb},
9810c0d06caSMauro Carvalho Chehab 	{0x3b, 0x01, 0x52, 0xbb},
9820c0d06caSMauro Carvalho Chehab 	{0x3c, 0x05, 0x40, 0xbb},
9830c0d06caSMauro Carvalho Chehab 	{0x57, 0x01, 0x9c, 0xbb},
9840c0d06caSMauro Carvalho Chehab 	{0x58, 0x01, 0xee, 0xbb},
9850c0d06caSMauro Carvalho Chehab 	{0x59, 0x00, 0xf0, 0xbb},
9860c0d06caSMauro Carvalho Chehab 	{0x5a, 0x01, 0x20, 0xbb},
9870c0d06caSMauro Carvalho Chehab 	{0x5c, 0x1d, 0x17, 0xbb},
9880c0d06caSMauro Carvalho Chehab 	{0x5d, 0x22, 0x1c, 0xbb},
9890c0d06caSMauro Carvalho Chehab 	{0x64, 0x1e, 0x1c, 0xbb},
9900c0d06caSMauro Carvalho Chehab 	{0x5b, 0x00, 0x00, 0xbb},
9910c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
9920c0d06caSMauro Carvalho Chehab 	{0x22, 0xa0, 0x78, 0xbb},
9930c0d06caSMauro Carvalho Chehab 	{0x23, 0xa0, 0x78, 0xbb},
9940c0d06caSMauro Carvalho Chehab 	{0x24, 0x7f, 0x00, 0xbb},
9950c0d06caSMauro Carvalho Chehab 	{0x28, 0xea, 0x02, 0xbb},
9960c0d06caSMauro Carvalho Chehab 	{0x29, 0x86, 0x7a, 0xbb},
9970c0d06caSMauro Carvalho Chehab 	{0x5e, 0x52, 0x4c, 0xbb},
9980c0d06caSMauro Carvalho Chehab 	{0x5f, 0x20, 0x24, 0xbb},
9990c0d06caSMauro Carvalho Chehab 	{0x60, 0x00, 0x02, 0xbb},
10000c0d06caSMauro Carvalho Chehab 	{0x02, 0x00, 0xee, 0xbb},
10010c0d06caSMauro Carvalho Chehab 	{0x03, 0x39, 0x23, 0xbb},
10020c0d06caSMauro Carvalho Chehab 	{0x04, 0x07, 0x24, 0xbb},
10030c0d06caSMauro Carvalho Chehab 	{0x09, 0x00, 0xc0, 0xbb},
10040c0d06caSMauro Carvalho Chehab 	{0x0a, 0x00, 0x79, 0xbb},
10050c0d06caSMauro Carvalho Chehab 	{0x0b, 0x00, 0x04, 0xbb},
10060c0d06caSMauro Carvalho Chehab 	{0x0c, 0x00, 0x5c, 0xbb},
10070c0d06caSMauro Carvalho Chehab 	{0x0d, 0x00, 0xd9, 0xbb},
10080c0d06caSMauro Carvalho Chehab 	{0x0e, 0x00, 0x53, 0xbb},
10090c0d06caSMauro Carvalho Chehab 	{0x0f, 0x00, 0x21, 0xbb},
10100c0d06caSMauro Carvalho Chehab 	{0x10, 0x00, 0xa4, 0xbb},
10110c0d06caSMauro Carvalho Chehab 	{0x11, 0x00, 0xe5, 0xbb},
10120c0d06caSMauro Carvalho Chehab 	{0x15, 0x00, 0x00, 0xbb},
10130c0d06caSMauro Carvalho Chehab 	{0x16, 0x00, 0x00, 0xbb},
10140c0d06caSMauro Carvalho Chehab 	{0x17, 0x00, 0x00, 0xbb},
10150c0d06caSMauro Carvalho Chehab 	{0x18, 0x00, 0x00, 0xbb},
10160c0d06caSMauro Carvalho Chehab 	{0x19, 0x00, 0x00, 0xbb},
10170c0d06caSMauro Carvalho Chehab 	{0x1a, 0x00, 0x00, 0xbb},
10180c0d06caSMauro Carvalho Chehab 	{0x1b, 0x00, 0x00, 0xbb},
10190c0d06caSMauro Carvalho Chehab 	{0x1c, 0x00, 0x00, 0xbb},
10200c0d06caSMauro Carvalho Chehab 	{0x1d, 0x00, 0x00, 0xbb},
10210c0d06caSMauro Carvalho Chehab 	{0x1e, 0x00, 0x00, 0xbb},
10220c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
10230c0d06caSMauro Carvalho Chehab 	{0x06, 0xe0, 0x0e, 0xbb},
10240c0d06caSMauro Carvalho Chehab 	{0x06, 0x60, 0x0e, 0xbb},
10250c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
10260c0d06caSMauro Carvalho Chehab 	{}
10270c0d06caSMauro Carvalho Chehab };
10280c0d06caSMauro Carvalho Chehab static const u8 mi1320_soc_InitQVGA[][4] = {
10290c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x01, 0xcc},
10300c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
10310c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
10320c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x30, 0xdd},
10330c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x64, 0xcc},
10340c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
10350c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
10360c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},
10370c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
10380c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
10390c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x02, 0xcc},
10400c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xc8, 0xcc},
10410c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x00, 0xcc},
10420c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0a, 0xcc},
10430c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},
10440c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
10450c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
10460c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x01, 0xcc},
10470c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},
10480c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
10490c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
10500c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},
10510c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x7f, 0xcc},
10520c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
10530c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x00, 0xcc},
10540c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0xd1, 0xcc},
10550c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},
10560c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
10570c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
10580c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
10590c0d06caSMauro Carvalho Chehab 	{0xc8, 0x00, 0x00, 0xbb},
10600c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x30, 0xdd},
10610c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
10620c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
10630c0d06caSMauro Carvalho Chehab 	{0x07, 0x00, 0xe0, 0xbb},
10640c0d06caSMauro Carvalho Chehab 	{0x08, 0x00, 0x0b, 0xbb},
10650c0d06caSMauro Carvalho Chehab 	{0x21, 0x00, 0x0c, 0xbb},
10660c0d06caSMauro Carvalho Chehab 	{0x20, 0x01, 0x03, 0xbb},	/* h/v flip */
10670c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x26, 0xcc},
10680c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x02, 0xcc},
10690c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x04, 0xcc},
10700c0d06caSMauro Carvalho Chehab 	{0xbc, 0x02, 0x18, 0xcc},
10710c0d06caSMauro Carvalho Chehab 	{0xbc, 0x03, 0x50, 0xcc},
10720c0d06caSMauro Carvalho Chehab 	{0xbc, 0x04, 0x18, 0xcc},
10730c0d06caSMauro Carvalho Chehab 	{0xbc, 0x05, 0x00, 0xcc},
10740c0d06caSMauro Carvalho Chehab 	{0xbc, 0x06, 0x00, 0xcc},
10750c0d06caSMauro Carvalho Chehab 	{0xbc, 0x08, 0x30, 0xcc},
10760c0d06caSMauro Carvalho Chehab 	{0xbc, 0x09, 0x40, 0xcc},
10770c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0a, 0x10, 0xcc},
10780c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0b, 0x00, 0xcc},
10790c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0c, 0x00, 0xcc},
10800c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
10810c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
10820c0d06caSMauro Carvalho Chehab 	{0x05, 0x01, 0x78, 0xbb},
10830c0d06caSMauro Carvalho Chehab 	{0x06, 0x00, 0x11, 0xbb},
10840c0d06caSMauro Carvalho Chehab 	{0x07, 0x01, 0x42, 0xbb},
10850c0d06caSMauro Carvalho Chehab 	{0x08, 0x00, 0x11, 0xbb},
10860c0d06caSMauro Carvalho Chehab 	{0x20, 0x01, 0x03, 0xbb},	/* h/v flip */
10870c0d06caSMauro Carvalho Chehab 	{0x21, 0x80, 0x00, 0xbb},
10880c0d06caSMauro Carvalho Chehab 	{0x22, 0x0d, 0x0f, 0xbb},
10890c0d06caSMauro Carvalho Chehab 	{0x24, 0x80, 0x00, 0xbb},
10900c0d06caSMauro Carvalho Chehab 	{0x59, 0x00, 0xff, 0xbb},
10910c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
10920c0d06caSMauro Carvalho Chehab 	{0x39, 0x03, 0xca, 0xbb},
10930c0d06caSMauro Carvalho Chehab 	{0x3a, 0x06, 0x80, 0xbb},
10940c0d06caSMauro Carvalho Chehab 	{0x3b, 0x01, 0x52, 0xbb},
10950c0d06caSMauro Carvalho Chehab 	{0x3c, 0x05, 0x40, 0xbb},
10960c0d06caSMauro Carvalho Chehab 	{0x57, 0x01, 0x9c, 0xbb},
10970c0d06caSMauro Carvalho Chehab 	{0x58, 0x01, 0xee, 0xbb},
10980c0d06caSMauro Carvalho Chehab 	{0x59, 0x00, 0xf0, 0xbb},
10990c0d06caSMauro Carvalho Chehab 	{0x5a, 0x01, 0x20, 0xbb},
11000c0d06caSMauro Carvalho Chehab 	{0x5c, 0x1d, 0x17, 0xbb},
11010c0d06caSMauro Carvalho Chehab 	{0x5d, 0x22, 0x1c, 0xbb},
11020c0d06caSMauro Carvalho Chehab 	{0x64, 0x1e, 0x1c, 0xbb},
11030c0d06caSMauro Carvalho Chehab 	{0x5b, 0x00, 0x00, 0xbb},
11040c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
11050c0d06caSMauro Carvalho Chehab 	{0x22, 0xa0, 0x78, 0xbb},
11060c0d06caSMauro Carvalho Chehab 	{0x23, 0xa0, 0x78, 0xbb},
11070c0d06caSMauro Carvalho Chehab 	{0x24, 0x7f, 0x00, 0xbb},
11080c0d06caSMauro Carvalho Chehab 	{0x28, 0xea, 0x02, 0xbb},
11090c0d06caSMauro Carvalho Chehab 	{0x29, 0x86, 0x7a, 0xbb},
11100c0d06caSMauro Carvalho Chehab 	{0x5e, 0x52, 0x4c, 0xbb},
11110c0d06caSMauro Carvalho Chehab 	{0x5f, 0x20, 0x24, 0xbb},
11120c0d06caSMauro Carvalho Chehab 	{0x60, 0x00, 0x02, 0xbb},
11130c0d06caSMauro Carvalho Chehab 	{0x02, 0x00, 0xee, 0xbb},
11140c0d06caSMauro Carvalho Chehab 	{0x03, 0x39, 0x23, 0xbb},
11150c0d06caSMauro Carvalho Chehab 	{0x04, 0x07, 0x24, 0xbb},
11160c0d06caSMauro Carvalho Chehab 	{0x09, 0x00, 0xc0, 0xbb},
11170c0d06caSMauro Carvalho Chehab 	{0x0a, 0x00, 0x79, 0xbb},
11180c0d06caSMauro Carvalho Chehab 	{0x0b, 0x00, 0x04, 0xbb},
11190c0d06caSMauro Carvalho Chehab 	{0x0c, 0x00, 0x5c, 0xbb},
11200c0d06caSMauro Carvalho Chehab 	{0x0d, 0x00, 0xd9, 0xbb},
11210c0d06caSMauro Carvalho Chehab 	{0x0e, 0x00, 0x53, 0xbb},
11220c0d06caSMauro Carvalho Chehab 	{0x0f, 0x00, 0x21, 0xbb},
11230c0d06caSMauro Carvalho Chehab 	{0x10, 0x00, 0xa4, 0xbb},
11240c0d06caSMauro Carvalho Chehab 	{0x11, 0x00, 0xe5, 0xbb},
11250c0d06caSMauro Carvalho Chehab 	{0x15, 0x00, 0x00, 0xbb},
11260c0d06caSMauro Carvalho Chehab 	{0x16, 0x00, 0x00, 0xbb},
11270c0d06caSMauro Carvalho Chehab 	{0x17, 0x00, 0x00, 0xbb},
11280c0d06caSMauro Carvalho Chehab 	{0x18, 0x00, 0x00, 0xbb},
11290c0d06caSMauro Carvalho Chehab 	{0x19, 0x00, 0x00, 0xbb},
11300c0d06caSMauro Carvalho Chehab 	{0x1a, 0x00, 0x00, 0xbb},
11310c0d06caSMauro Carvalho Chehab 	{0x1b, 0x00, 0x00, 0xbb},
11320c0d06caSMauro Carvalho Chehab 	{0x1c, 0x00, 0x00, 0xbb},
11330c0d06caSMauro Carvalho Chehab 	{0x1d, 0x00, 0x00, 0xbb},
11340c0d06caSMauro Carvalho Chehab 	{0x1e, 0x00, 0x00, 0xbb},
11350c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
11360c0d06caSMauro Carvalho Chehab 	{0x06, 0xe0, 0x0e, 0xbb},
11370c0d06caSMauro Carvalho Chehab 	{0x06, 0x60, 0x0e, 0xbb},
11380c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
11390c0d06caSMauro Carvalho Chehab 	{}
11400c0d06caSMauro Carvalho Chehab };
11410c0d06caSMauro Carvalho Chehab static const u8 mi1320_soc_InitSXGA[][4] = {
11420c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x01, 0xcc},
11430c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
11440c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x30, 0xdd},
11450c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x64, 0xcc},
11460c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
11470c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
11480c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},
11490c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
11500c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
11510c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x02, 0xcc},
11520c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xc8, 0xcc},
11530c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x00, 0xcc},
11540c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0a, 0xcc},
11550c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},
11560c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
11570c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
11580c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x04, 0xcc},
11590c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0x00, 0xcc},
11600c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
11610c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
11620c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x04, 0xcc},
11630c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0xff, 0xcc},
11640c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
11650c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0x71, 0xcc},
11660c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},
11670c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
11680c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
11690c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x30, 0xdd},
11700c0d06caSMauro Carvalho Chehab 	{0xc8, 0x9f, 0x0b, 0xbb},
11710c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x20, 0xdd},
11720c0d06caSMauro Carvalho Chehab 	{0x5b, 0x00, 0x01, 0xbb},
11730c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x20, 0xdd},
11740c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
11750c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x30, 0xdd},
11760c0d06caSMauro Carvalho Chehab 	{0x20, 0x01, 0x03, 0xbb},	/* h/v flip */
11770c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x20, 0xdd},
11780c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x26, 0xcc},
11790c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x02, 0xcc},
11800c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x04, 0xcc},
11810c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
11820c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
11830c0d06caSMauro Carvalho Chehab 	{0x05, 0x01, 0x78, 0xbb},
11840c0d06caSMauro Carvalho Chehab 	{0x06, 0x00, 0x11, 0xbb},
11850c0d06caSMauro Carvalho Chehab 	{0x07, 0x01, 0x42, 0xbb},
11860c0d06caSMauro Carvalho Chehab 	{0x08, 0x00, 0x11, 0xbb},
11870c0d06caSMauro Carvalho Chehab 	{0x20, 0x01, 0x03, 0xbb},	/* h/v flip */
11880c0d06caSMauro Carvalho Chehab 	{0x21, 0x80, 0x00, 0xbb},
11890c0d06caSMauro Carvalho Chehab 	{0x22, 0x0d, 0x0f, 0xbb},
11900c0d06caSMauro Carvalho Chehab 	{0x24, 0x80, 0x00, 0xbb},
11910c0d06caSMauro Carvalho Chehab 	{0x59, 0x00, 0xff, 0xbb},
11920c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
11930c0d06caSMauro Carvalho Chehab 	{0x39, 0x03, 0xca, 0xbb},
11940c0d06caSMauro Carvalho Chehab 	{0x3a, 0x06, 0x80, 0xbb},
11950c0d06caSMauro Carvalho Chehab 	{0x3b, 0x01, 0x52, 0xbb},
11960c0d06caSMauro Carvalho Chehab 	{0x3c, 0x05, 0x40, 0xbb},
11970c0d06caSMauro Carvalho Chehab 	{0x57, 0x01, 0x9c, 0xbb},
11980c0d06caSMauro Carvalho Chehab 	{0x58, 0x01, 0xee, 0xbb},
11990c0d06caSMauro Carvalho Chehab 	{0x59, 0x00, 0xf0, 0xbb},
12000c0d06caSMauro Carvalho Chehab 	{0x5a, 0x01, 0x20, 0xbb},
12010c0d06caSMauro Carvalho Chehab 	{0x5c, 0x1d, 0x17, 0xbb},
12020c0d06caSMauro Carvalho Chehab 	{0x5d, 0x22, 0x1c, 0xbb},
12030c0d06caSMauro Carvalho Chehab 	{0x64, 0x1e, 0x1c, 0xbb},
12040c0d06caSMauro Carvalho Chehab 	{0x5b, 0x00, 0x00, 0xbb},
12050c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
12060c0d06caSMauro Carvalho Chehab 	{0x22, 0xa0, 0x78, 0xbb},
12070c0d06caSMauro Carvalho Chehab 	{0x23, 0xa0, 0x78, 0xbb},
12080c0d06caSMauro Carvalho Chehab 	{0x24, 0x7f, 0x00, 0xbb},
12090c0d06caSMauro Carvalho Chehab 	{0x28, 0xea, 0x02, 0xbb},
12100c0d06caSMauro Carvalho Chehab 	{0x29, 0x86, 0x7a, 0xbb},
12110c0d06caSMauro Carvalho Chehab 	{0x5e, 0x52, 0x4c, 0xbb},
12120c0d06caSMauro Carvalho Chehab 	{0x5f, 0x20, 0x24, 0xbb},
12130c0d06caSMauro Carvalho Chehab 	{0x60, 0x00, 0x02, 0xbb},
12140c0d06caSMauro Carvalho Chehab 	{0x02, 0x00, 0xee, 0xbb},
12150c0d06caSMauro Carvalho Chehab 	{0x03, 0x39, 0x23, 0xbb},
12160c0d06caSMauro Carvalho Chehab 	{0x04, 0x07, 0x24, 0xbb},
12170c0d06caSMauro Carvalho Chehab 	{0x09, 0x00, 0xc0, 0xbb},
12180c0d06caSMauro Carvalho Chehab 	{0x0a, 0x00, 0x79, 0xbb},
12190c0d06caSMauro Carvalho Chehab 	{0x0b, 0x00, 0x04, 0xbb},
12200c0d06caSMauro Carvalho Chehab 	{0x0c, 0x00, 0x5c, 0xbb},
12210c0d06caSMauro Carvalho Chehab 	{0x0d, 0x00, 0xd9, 0xbb},
12220c0d06caSMauro Carvalho Chehab 	{0x0e, 0x00, 0x53, 0xbb},
12230c0d06caSMauro Carvalho Chehab 	{0x0f, 0x00, 0x21, 0xbb},
12240c0d06caSMauro Carvalho Chehab 	{0x10, 0x00, 0xa4, 0xbb},
12250c0d06caSMauro Carvalho Chehab 	{0x11, 0x00, 0xe5, 0xbb},
12260c0d06caSMauro Carvalho Chehab 	{0x15, 0x00, 0x00, 0xbb},
12270c0d06caSMauro Carvalho Chehab 	{0x16, 0x00, 0x00, 0xbb},
12280c0d06caSMauro Carvalho Chehab 	{0x17, 0x00, 0x00, 0xbb},
12290c0d06caSMauro Carvalho Chehab 	{0x18, 0x00, 0x00, 0xbb},
12300c0d06caSMauro Carvalho Chehab 	{0x19, 0x00, 0x00, 0xbb},
12310c0d06caSMauro Carvalho Chehab 	{0x1a, 0x00, 0x00, 0xbb},
12320c0d06caSMauro Carvalho Chehab 	{0x1b, 0x00, 0x00, 0xbb},
12330c0d06caSMauro Carvalho Chehab 	{0x1c, 0x00, 0x00, 0xbb},
12340c0d06caSMauro Carvalho Chehab 	{0x1d, 0x00, 0x00, 0xbb},
12350c0d06caSMauro Carvalho Chehab 	{0x1e, 0x00, 0x00, 0xbb},
12360c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x01, 0xbb},
12370c0d06caSMauro Carvalho Chehab 	{0x06, 0xe0, 0x0e, 0xbb},
12380c0d06caSMauro Carvalho Chehab 	{0x06, 0x60, 0x0e, 0xbb},
12390c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
12400c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x00, 0xbb},
12410c0d06caSMauro Carvalho Chehab 	{0x05, 0x01, 0x13, 0xbb},
12420c0d06caSMauro Carvalho Chehab 	{0x06, 0x00, 0x11, 0xbb},
12430c0d06caSMauro Carvalho Chehab 	{0x07, 0x00, 0x85, 0xbb},
12440c0d06caSMauro Carvalho Chehab 	{0x08, 0x00, 0x27, 0xbb},
12450c0d06caSMauro Carvalho Chehab 	{0x20, 0x01, 0x03, 0xbb},	/* h/v flip */
12460c0d06caSMauro Carvalho Chehab 	{0x21, 0x80, 0x00, 0xbb},
12470c0d06caSMauro Carvalho Chehab 	{0x22, 0x0d, 0x0f, 0xbb},
12480c0d06caSMauro Carvalho Chehab 	{0x24, 0x80, 0x00, 0xbb},
12490c0d06caSMauro Carvalho Chehab 	{0x59, 0x00, 0xff, 0xbb},
12500c0d06caSMauro Carvalho Chehab 	{0xf0, 0x00, 0x02, 0xbb},
12510c0d06caSMauro Carvalho Chehab 	{0x39, 0x03, 0x0d, 0xbb},
12520c0d06caSMauro Carvalho Chehab 	{0x3a, 0x06, 0x1b, 0xbb},
12530c0d06caSMauro Carvalho Chehab 	{0x3b, 0x00, 0x95, 0xbb},
12540c0d06caSMauro Carvalho Chehab 	{0x3c, 0x04, 0xdb, 0xbb},
12550c0d06caSMauro Carvalho Chehab 	{0x57, 0x02, 0x00, 0xbb},
12560c0d06caSMauro Carvalho Chehab 	{0x58, 0x02, 0x66, 0xbb},
12570c0d06caSMauro Carvalho Chehab 	{0x59, 0x00, 0xff, 0xbb},
12580c0d06caSMauro Carvalho Chehab 	{0x5a, 0x01, 0x33, 0xbb},
12590c0d06caSMauro Carvalho Chehab 	{0x5c, 0x12, 0x0d, 0xbb},
12600c0d06caSMauro Carvalho Chehab 	{0x5d, 0x16, 0x11, 0xbb},
12610c0d06caSMauro Carvalho Chehab 	{0x64, 0x5e, 0x1c, 0xbb},
12620c0d06caSMauro Carvalho Chehab 	{}
12630c0d06caSMauro Carvalho Chehab };
12640c0d06caSMauro Carvalho Chehab static const u8 po3130_gamma[17] = {
12650c0d06caSMauro Carvalho Chehab 	0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
12660c0d06caSMauro Carvalho Chehab 	0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff
12670c0d06caSMauro Carvalho Chehab };
12680c0d06caSMauro Carvalho Chehab static const u8 po3130_matrix[9] = {
12690c0d06caSMauro Carvalho Chehab 	0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63
12700c0d06caSMauro Carvalho Chehab };
12710c0d06caSMauro Carvalho Chehab 
12720c0d06caSMauro Carvalho Chehab static const u8 po3130_initVGA_data[][4] = {
12730c0d06caSMauro Carvalho Chehab 	{0xb0, 0x4d, 0x00, 0xcc},	{0xb3, 0x01, 0x01, 0xcc},
12740c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x50, 0xdd},	{0xb0, 0x03, 0x01, 0xcc},
12750c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x04, 0xcc},	{0xb3, 0x00, 0x24, 0xcc},
12760c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x25, 0xcc},	{0xb3, 0x08, 0x01, 0xcc},
12770c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},	{0xb3, 0x05, 0x00, 0xcc},
12780c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},	{0xb3, 0x03, 0x1a, 0xcc},
12790c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x15, 0xcc},	{0xb3, 0x20, 0x00, 0xcc},
12800c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},	{0xb3, 0x22, 0x01, 0xcc},
12810c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe8, 0xcc},	{0xb8, 0x08, 0xe8, 0xcc},
12820c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},	{0xb3, 0x15, 0x00, 0xcc},
12830c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},	{0xb3, 0x17, 0x7f, 0xcc},
12840c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x01, 0xcc},
12850c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xf6, 0xcc},	/* i2c add: 76 */
12860c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x27, 0xcc},	{0xbc, 0x00, 0x71, 0xcc},
12870c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x21, 0xcc},	{0xb8, 0x27, 0x20, 0xcc},
12880c0d06caSMauro Carvalho Chehab 	{0xb8, 0x01, 0x79, 0xcc},	{0xb8, 0x81, 0x09, 0xcc},
12890c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2c, 0x50, 0xcc},	{0xb8, 0x2d, 0xf8, 0xcc},
12900c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2e, 0xf8, 0xcc},	{0xb8, 0x2f, 0xf8, 0xcc},
12910c0d06caSMauro Carvalho Chehab 	{0xb8, 0x30, 0x50, 0xcc},	{0xb8, 0x31, 0xf8, 0xcc},
12920c0d06caSMauro Carvalho Chehab 	{0xb8, 0x32, 0xf8, 0xcc},	{0xb8, 0x33, 0xf8, 0xcc},
12930c0d06caSMauro Carvalho Chehab 	{0xb8, 0x34, 0x50, 0xcc},	{0xb8, 0x35, 0x00, 0xcc},
12940c0d06caSMauro Carvalho Chehab 	{0xb8, 0x36, 0x00, 0xcc},	{0xb8, 0x37, 0x00, 0xcc},
12950c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0xc6, 0xaa},	{0x00, 0x20, 0x44, 0xaa},
12960c0d06caSMauro Carvalho Chehab 	{0x00, 0xad, 0x02, 0xaa},	{0x00, 0xae, 0x2c, 0xaa},
12970c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x08, 0xaa},	{0x00, 0x17, 0x41, 0xaa},
12980c0d06caSMauro Carvalho Chehab 	{0x00, 0x19, 0x41, 0xaa},	{0x00, 0x1e, 0x06, 0xaa},
12990c0d06caSMauro Carvalho Chehab 	{0x00, 0x21, 0x00, 0xaa},	{0x00, 0x36, 0xc0, 0xaa},
13000c0d06caSMauro Carvalho Chehab 	{0x00, 0x37, 0xc8, 0xaa},	{0x00, 0x3b, 0x36, 0xaa},
13010c0d06caSMauro Carvalho Chehab 	{0x00, 0x4b, 0xfe, 0xaa},	{0x00, 0x51, 0x1c, 0xaa},
13020c0d06caSMauro Carvalho Chehab 	{0x00, 0x52, 0x01, 0xaa},	{0x00, 0x55, 0x0a, 0xaa},
13030c0d06caSMauro Carvalho Chehab 	{0x00, 0x59, 0x02, 0xaa},	{0x00, 0x5a, 0x04, 0xaa},
13040c0d06caSMauro Carvalho Chehab 	{0x00, 0x5c, 0x10, 0xaa},	{0x00, 0x5d, 0x10, 0xaa},
13050c0d06caSMauro Carvalho Chehab 	{0x00, 0x5e, 0x10, 0xaa},	{0x00, 0x5f, 0x10, 0xaa},
13060c0d06caSMauro Carvalho Chehab 	{0x00, 0x61, 0x00, 0xaa},	{0x00, 0x62, 0x18, 0xaa},
13070c0d06caSMauro Carvalho Chehab 	{0x00, 0x63, 0x30, 0xaa},	{0x00, 0x70, 0x68, 0xaa},
13080c0d06caSMauro Carvalho Chehab 	{0x00, 0x80, 0x71, 0xaa},	{0x00, 0x81, 0x08, 0xaa},
13090c0d06caSMauro Carvalho Chehab 	{0x00, 0x82, 0x00, 0xaa},	{0x00, 0x83, 0x55, 0xaa},
13100c0d06caSMauro Carvalho Chehab 	{0x00, 0x84, 0x06, 0xaa},	{0x00, 0x85, 0x06, 0xaa},
13110c0d06caSMauro Carvalho Chehab 	{0x00, 0x86, 0x13, 0xaa},	{0x00, 0x87, 0x18, 0xaa},
13120c0d06caSMauro Carvalho Chehab 	{0x00, 0xaa, 0x3f, 0xaa},	{0x00, 0xab, 0x44, 0xaa},
13130c0d06caSMauro Carvalho Chehab 	{0x00, 0xb0, 0x68, 0xaa},	{0x00, 0xb5, 0x10, 0xaa},
13140c0d06caSMauro Carvalho Chehab 	{0x00, 0xb8, 0x20, 0xaa},	{0x00, 0xb9, 0xa0, 0xaa},
13150c0d06caSMauro Carvalho Chehab 	{0x00, 0xbc, 0x04, 0xaa},	{0x00, 0x8b, 0x40, 0xaa},
13160c0d06caSMauro Carvalho Chehab 	{0x00, 0x8c, 0x91, 0xaa},	{0x00, 0x8d, 0x8f, 0xaa},
13170c0d06caSMauro Carvalho Chehab 	{0x00, 0x8e, 0x91, 0xaa},	{0x00, 0x8f, 0x43, 0xaa},
13180c0d06caSMauro Carvalho Chehab 	{0x00, 0x90, 0x92, 0xaa},	{0x00, 0x91, 0x89, 0xaa},
13190c0d06caSMauro Carvalho Chehab 	{0x00, 0x92, 0x9d, 0xaa},	{0x00, 0x93, 0x46, 0xaa},
13200c0d06caSMauro Carvalho Chehab 	{0x00, 0xd6, 0x22, 0xaa},	{0x00, 0x73, 0x00, 0xaa},
13210c0d06caSMauro Carvalho Chehab 	{0x00, 0x74, 0x10, 0xaa},	{0x00, 0x75, 0x20, 0xaa},
13220c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0x2b, 0xaa},	{0x00, 0x77, 0x36, 0xaa},
13230c0d06caSMauro Carvalho Chehab 	{0x00, 0x78, 0x49, 0xaa},	{0x00, 0x79, 0x5a, 0xaa},
13240c0d06caSMauro Carvalho Chehab 	{0x00, 0x7a, 0x7f, 0xaa},	{0x00, 0x7b, 0x9b, 0xaa},
13250c0d06caSMauro Carvalho Chehab 	{0x00, 0x7c, 0xba, 0xaa},	{0x00, 0x7d, 0xd4, 0xaa},
13260c0d06caSMauro Carvalho Chehab 	{0x00, 0x7e, 0xea, 0xaa},	{0x00, 0xd6, 0x62, 0xaa},
13270c0d06caSMauro Carvalho Chehab 	{0x00, 0x73, 0x00, 0xaa},	{0x00, 0x74, 0x10, 0xaa},
13280c0d06caSMauro Carvalho Chehab 	{0x00, 0x75, 0x20, 0xaa},	{0x00, 0x76, 0x2b, 0xaa},
13290c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x36, 0xaa},	{0x00, 0x78, 0x49, 0xaa},
13300c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x5a, 0xaa},	{0x00, 0x7a, 0x7f, 0xaa},
13310c0d06caSMauro Carvalho Chehab 	{0x00, 0x7b, 0x9b, 0xaa},	{0x00, 0x7c, 0xba, 0xaa},
13320c0d06caSMauro Carvalho Chehab 	{0x00, 0x7d, 0xd4, 0xaa},	{0x00, 0x7e, 0xea, 0xaa},
13330c0d06caSMauro Carvalho Chehab 	{0x00, 0xd6, 0xa2, 0xaa},	{0x00, 0x73, 0x00, 0xaa},
13340c0d06caSMauro Carvalho Chehab 	{0x00, 0x74, 0x10, 0xaa},	{0x00, 0x75, 0x20, 0xaa},
13350c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0x2b, 0xaa},	{0x00, 0x77, 0x36, 0xaa},
13360c0d06caSMauro Carvalho Chehab 	{0x00, 0x78, 0x49, 0xaa},	{0x00, 0x79, 0x5a, 0xaa},
13370c0d06caSMauro Carvalho Chehab 	{0x00, 0x7a, 0x7f, 0xaa},	{0x00, 0x7b, 0x9b, 0xaa},
13380c0d06caSMauro Carvalho Chehab 	{0x00, 0x7c, 0xba, 0xaa},	{0x00, 0x7d, 0xd4, 0xaa},
13390c0d06caSMauro Carvalho Chehab 	{0x00, 0x7e, 0xea, 0xaa},
13400c0d06caSMauro Carvalho Chehab 	{0x00, 0x4c, 0x07, 0xaa},
13410c0d06caSMauro Carvalho Chehab 	{0x00, 0x4b, 0xe0, 0xaa},	{0x00, 0x4e, 0x77, 0xaa},
13420c0d06caSMauro Carvalho Chehab 	{0x00, 0x59, 0x02, 0xaa},	{0x00, 0x4d, 0x0a, 0xaa},
13430c0d06caSMauro Carvalho Chehab /*	{0x00, 0xd1, 0x00, 0xaa},	{0x00, 0x20, 0xc4, 0xaa},
13440c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},	{0xb8, 0x8f, 0xff, 0xcc}, */
13450c0d06caSMauro Carvalho Chehab 	{0x00, 0xd1, 0x3c, 0xaa},	{0x00, 0x20, 0xc4, 0xaa},
13460c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},	{0xb8, 0x8f, 0xff, 0xcc},
13470c0d06caSMauro Carvalho Chehab 	{0xb8, 0xfe, 0x00, 0xcc},	{0xb8, 0xff, 0x28, 0xcc},
13480c0d06caSMauro Carvalho Chehab 	{0xb9, 0x00, 0x28, 0xcc},	{0xb9, 0x01, 0x28, 0xcc},
13490c0d06caSMauro Carvalho Chehab 	{0xb9, 0x02, 0x28, 0xcc},	{0xb9, 0x03, 0x00, 0xcc},
13500c0d06caSMauro Carvalho Chehab 	{0xb9, 0x04, 0x00, 0xcc},	{0xb9, 0x05, 0x3c, 0xcc},
13510c0d06caSMauro Carvalho Chehab 	{0xb9, 0x06, 0x3c, 0xcc},	{0xb9, 0x07, 0x3c, 0xcc},
13520c0d06caSMauro Carvalho Chehab 	{0xb9, 0x08, 0x3c, 0xcc},	{0x00, 0x05, 0x00, 0xaa},
13530c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x00, 0xcc},	{0xb3, 0x01, 0x41, 0xcc},
13540c0d06caSMauro Carvalho Chehab 	{}
13550c0d06caSMauro Carvalho Chehab };
13560c0d06caSMauro Carvalho Chehab static const u8 po3130_rundata[][4] = {
13570c0d06caSMauro Carvalho Chehab 	{0x00, 0x47, 0x45, 0xaa},	{0x00, 0x48, 0x9b, 0xaa},
13580c0d06caSMauro Carvalho Chehab 	{0x00, 0x49, 0x3a, 0xaa},	{0x00, 0x4a, 0x01, 0xaa},
13590c0d06caSMauro Carvalho Chehab 	{0x00, 0x44, 0x40, 0xaa},
13600c0d06caSMauro Carvalho Chehab /*	{0x00, 0xd5, 0x7c, 0xaa}, */
13610c0d06caSMauro Carvalho Chehab 	{0x00, 0xad, 0x04, 0xaa},	{0x00, 0xae, 0x00, 0xaa},
13620c0d06caSMauro Carvalho Chehab 	{0x00, 0xb0, 0x78, 0xaa},	{0x00, 0x98, 0x02, 0xaa},
13630c0d06caSMauro Carvalho Chehab 	{0x00, 0x94, 0x25, 0xaa},	{0x00, 0x95, 0x25, 0xaa},
13640c0d06caSMauro Carvalho Chehab 	{0x00, 0x59, 0x68, 0xaa},	{0x00, 0x44, 0x20, 0xaa},
13650c0d06caSMauro Carvalho Chehab 	{0x00, 0x17, 0x50, 0xaa},	{0x00, 0x19, 0x50, 0xaa},
13660c0d06caSMauro Carvalho Chehab 	{0x00, 0xd1, 0x3c, 0xaa},	{0x00, 0xd1, 0x3c, 0xaa},
13670c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0x06, 0xaa},	{0x00, 0x1e, 0x06, 0xaa},
13680c0d06caSMauro Carvalho Chehab 	{}
13690c0d06caSMauro Carvalho Chehab };
13700c0d06caSMauro Carvalho Chehab 
13710c0d06caSMauro Carvalho Chehab static const u8 po3130_initQVGA_data[][4] = {
13720c0d06caSMauro Carvalho Chehab 	{0xb0, 0x4d, 0x00, 0xcc},	{0xb3, 0x01, 0x01, 0xcc},
13730c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x50, 0xdd},	{0xb0, 0x03, 0x09, 0xcc},
13740c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x04, 0xcc},	{0xb3, 0x00, 0x24, 0xcc},
13750c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x25, 0xcc},	{0xb3, 0x08, 0x01, 0xcc},
13760c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},	{0xb3, 0x05, 0x00, 0xcc},
13770c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},	{0xb3, 0x03, 0x1a, 0xcc},
13780c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x15, 0xcc},	{0xb3, 0x20, 0x00, 0xcc},
13790c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},	{0xb3, 0x22, 0x01, 0xcc},
13800c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},	{0xb8, 0x08, 0xe0, 0xcc},
13810c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},	{0xb3, 0x15, 0x00, 0xcc},
13820c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},	{0xb3, 0x17, 0x7f, 0xcc},
13830c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x01, 0xcc},	{0xb3, 0x35, 0xf6, 0xcc},
13840c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x27, 0xcc},	{0xbc, 0x00, 0xd1, 0xcc},
13850c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x21, 0xcc},	{0xb8, 0x27, 0x20, 0xcc},
13860c0d06caSMauro Carvalho Chehab 	{0xb8, 0x01, 0x79, 0xcc},	{0xb8, 0x81, 0x09, 0xcc},
13870c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2c, 0x50, 0xcc},	{0xb8, 0x2d, 0xf8, 0xcc},
13880c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2e, 0xf8, 0xcc},	{0xb8, 0x2f, 0xf8, 0xcc},
13890c0d06caSMauro Carvalho Chehab 	{0xb8, 0x30, 0x50, 0xcc},	{0xb8, 0x31, 0xf8, 0xcc},
13900c0d06caSMauro Carvalho Chehab 	{0xb8, 0x32, 0xf8, 0xcc},	{0xb8, 0x33, 0xf8, 0xcc},
13910c0d06caSMauro Carvalho Chehab 	{0xb8, 0x34, 0x50, 0xcc},	{0xb8, 0x35, 0x00, 0xcc},
13920c0d06caSMauro Carvalho Chehab 	{0xb8, 0x36, 0x00, 0xcc},	{0xb8, 0x37, 0x00, 0xcc},
13930c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0xc6, 0xaa},	{0x00, 0x20, 0x44, 0xaa},
13940c0d06caSMauro Carvalho Chehab 	{0x00, 0xad, 0x02, 0xaa},	{0x00, 0xae, 0x2c, 0xaa},
13950c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x08, 0xaa},	{0x00, 0x17, 0x41, 0xaa},
13960c0d06caSMauro Carvalho Chehab 	{0x00, 0x19, 0x41, 0xaa},	{0x00, 0x1e, 0x06, 0xaa},
13970c0d06caSMauro Carvalho Chehab 	{0x00, 0x21, 0x00, 0xaa},	{0x00, 0x36, 0xc0, 0xaa},
13980c0d06caSMauro Carvalho Chehab 	{0x00, 0x37, 0xc8, 0xaa},	{0x00, 0x3b, 0x36, 0xaa},
13990c0d06caSMauro Carvalho Chehab 	{0x00, 0x4b, 0xfe, 0xaa},	{0x00, 0x51, 0x1c, 0xaa},
14000c0d06caSMauro Carvalho Chehab 	{0x00, 0x52, 0x01, 0xaa},	{0x00, 0x55, 0x0a, 0xaa},
14010c0d06caSMauro Carvalho Chehab 	{0x00, 0x59, 0x6f, 0xaa},	{0x00, 0x5a, 0x04, 0xaa},
14020c0d06caSMauro Carvalho Chehab 	{0x00, 0x5c, 0x10, 0xaa},	{0x00, 0x5d, 0x10, 0xaa},
14030c0d06caSMauro Carvalho Chehab 	{0x00, 0x5e, 0x10, 0xaa},	{0x00, 0x5f, 0x10, 0xaa},
14040c0d06caSMauro Carvalho Chehab 	{0x00, 0x61, 0x00, 0xaa},	{0x00, 0x62, 0x18, 0xaa},
14050c0d06caSMauro Carvalho Chehab 	{0x00, 0x63, 0x30, 0xaa},	{0x00, 0x70, 0x68, 0xaa},
14060c0d06caSMauro Carvalho Chehab 	{0x00, 0x80, 0x71, 0xaa},	{0x00, 0x81, 0x08, 0xaa},
14070c0d06caSMauro Carvalho Chehab 	{0x00, 0x82, 0x00, 0xaa},	{0x00, 0x83, 0x55, 0xaa},
14080c0d06caSMauro Carvalho Chehab 	{0x00, 0x84, 0x06, 0xaa},	{0x00, 0x85, 0x06, 0xaa},
14090c0d06caSMauro Carvalho Chehab 	{0x00, 0x86, 0x13, 0xaa},	{0x00, 0x87, 0x18, 0xaa},
14100c0d06caSMauro Carvalho Chehab 	{0x00, 0xaa, 0x3f, 0xaa},	{0x00, 0xab, 0x44, 0xaa},
14110c0d06caSMauro Carvalho Chehab 	{0x00, 0xb0, 0x68, 0xaa},	{0x00, 0xb5, 0x10, 0xaa},
14120c0d06caSMauro Carvalho Chehab 	{0x00, 0xb8, 0x20, 0xaa},	{0x00, 0xb9, 0xa0, 0xaa},
14130c0d06caSMauro Carvalho Chehab 	{0x00, 0xbc, 0x04, 0xaa},	{0x00, 0x8b, 0x40, 0xaa},
14140c0d06caSMauro Carvalho Chehab 	{0x00, 0x8c, 0x91, 0xaa},	{0x00, 0x8d, 0x8f, 0xaa},
14150c0d06caSMauro Carvalho Chehab 	{0x00, 0x8e, 0x91, 0xaa},	{0x00, 0x8f, 0x43, 0xaa},
14160c0d06caSMauro Carvalho Chehab 	{0x00, 0x90, 0x92, 0xaa},	{0x00, 0x91, 0x89, 0xaa},
14170c0d06caSMauro Carvalho Chehab 	{0x00, 0x92, 0x9d, 0xaa},	{0x00, 0x93, 0x46, 0xaa},
14180c0d06caSMauro Carvalho Chehab 	{0x00, 0xd6, 0x22, 0xaa},	{0x00, 0x73, 0x00, 0xaa},
14190c0d06caSMauro Carvalho Chehab 	{0x00, 0x74, 0x10, 0xaa},	{0x00, 0x75, 0x20, 0xaa},
14200c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0x2b, 0xaa},	{0x00, 0x77, 0x36, 0xaa},
14210c0d06caSMauro Carvalho Chehab 	{0x00, 0x78, 0x49, 0xaa},	{0x00, 0x79, 0x5a, 0xaa},
14220c0d06caSMauro Carvalho Chehab 	{0x00, 0x7a, 0x7f, 0xaa},	{0x00, 0x7b, 0x9b, 0xaa},
14230c0d06caSMauro Carvalho Chehab 	{0x00, 0x7c, 0xba, 0xaa},	{0x00, 0x7d, 0xd4, 0xaa},
14240c0d06caSMauro Carvalho Chehab 	{0x00, 0x7e, 0xea, 0xaa},	{0x00, 0xd6, 0x62, 0xaa},
14250c0d06caSMauro Carvalho Chehab 	{0x00, 0x73, 0x00, 0xaa},	{0x00, 0x74, 0x10, 0xaa},
14260c0d06caSMauro Carvalho Chehab 	{0x00, 0x75, 0x20, 0xaa},	{0x00, 0x76, 0x2b, 0xaa},
14270c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x36, 0xaa},	{0x00, 0x78, 0x49, 0xaa},
14280c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x5a, 0xaa},	{0x00, 0x7a, 0x7f, 0xaa},
14290c0d06caSMauro Carvalho Chehab 	{0x00, 0x7b, 0x9b, 0xaa},	{0x00, 0x7c, 0xba, 0xaa},
14300c0d06caSMauro Carvalho Chehab 	{0x00, 0x7d, 0xd4, 0xaa},	{0x00, 0x7e, 0xea, 0xaa},
14310c0d06caSMauro Carvalho Chehab 	{0x00, 0xd6, 0xa2, 0xaa},	{0x00, 0x73, 0x00, 0xaa},
14320c0d06caSMauro Carvalho Chehab 	{0x00, 0x74, 0x10, 0xaa},	{0x00, 0x75, 0x20, 0xaa},
14330c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0x2b, 0xaa},	{0x00, 0x77, 0x36, 0xaa},
14340c0d06caSMauro Carvalho Chehab 	{0x00, 0x78, 0x49, 0xaa},	{0x00, 0x79, 0x5a, 0xaa},
14350c0d06caSMauro Carvalho Chehab 	{0x00, 0x7a, 0x7f, 0xaa},	{0x00, 0x7b, 0x9b, 0xaa},
14360c0d06caSMauro Carvalho Chehab 	{0x00, 0x7c, 0xba, 0xaa},	{0x00, 0x7d, 0xd4, 0xaa},
14370c0d06caSMauro Carvalho Chehab 	{0x00, 0x7e, 0xea, 0xaa},	{0x00, 0x4c, 0x07, 0xaa},
14380c0d06caSMauro Carvalho Chehab 	{0x00, 0x4b, 0xe0, 0xaa},	{0x00, 0x4e, 0x77, 0xaa},
14390c0d06caSMauro Carvalho Chehab 	{0x00, 0x59, 0x66, 0xaa},	{0x00, 0x4d, 0x0a, 0xaa},
14400c0d06caSMauro Carvalho Chehab 	{0x00, 0xd1, 0x00, 0xaa},	{0x00, 0x20, 0xc4, 0xaa},
14410c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},	{0xb8, 0x8f, 0xff, 0xcc},
14420c0d06caSMauro Carvalho Chehab 	{0xb8, 0xfe, 0x00, 0xcc},	{0xb8, 0xff, 0x28, 0xcc},
14430c0d06caSMauro Carvalho Chehab 	{0xb9, 0x00, 0x28, 0xcc},	{0xb9, 0x01, 0x28, 0xcc},
14440c0d06caSMauro Carvalho Chehab 	{0xb9, 0x02, 0x28, 0xcc},	{0xb9, 0x03, 0x00, 0xcc},
14450c0d06caSMauro Carvalho Chehab 	{0xb9, 0x04, 0x00, 0xcc},	{0xb9, 0x05, 0x3c, 0xcc},
14460c0d06caSMauro Carvalho Chehab 	{0xb9, 0x06, 0x3c, 0xcc},	{0xb9, 0x07, 0x3c, 0xcc},
14470c0d06caSMauro Carvalho Chehab 	{0xb9, 0x08, 0x3c, 0xcc},	{0xbc, 0x02, 0x18, 0xcc},
14480c0d06caSMauro Carvalho Chehab 	{0xbc, 0x03, 0x50, 0xcc},	{0xbc, 0x04, 0x18, 0xcc},
14490c0d06caSMauro Carvalho Chehab 	{0xbc, 0x05, 0x00, 0xcc},	{0xbc, 0x06, 0x00, 0xcc},
14500c0d06caSMauro Carvalho Chehab 	{0xbc, 0x08, 0x30, 0xcc},	{0xbc, 0x09, 0x40, 0xcc},
14510c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0a, 0x10, 0xcc},	{0xbc, 0x0b, 0x00, 0xcc},
14520c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0c, 0x00, 0xcc},	{0x00, 0x05, 0x00, 0xaa},
14530c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x00, 0xcc},	{0xb3, 0x01, 0x41, 0xcc},
14540c0d06caSMauro Carvalho Chehab 	{}
14550c0d06caSMauro Carvalho Chehab };
14560c0d06caSMauro Carvalho Chehab 
14570c0d06caSMauro Carvalho Chehab static const u8 hv7131r_gamma[17] = {
14580c0d06caSMauro Carvalho Chehab 	0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
14590c0d06caSMauro Carvalho Chehab 	0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff
14600c0d06caSMauro Carvalho Chehab };
14610c0d06caSMauro Carvalho Chehab static const u8 hv7131r_matrix[9] = {
14620c0d06caSMauro Carvalho Chehab 	0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63
14630c0d06caSMauro Carvalho Chehab };
14640c0d06caSMauro Carvalho Chehab static const u8 hv7131r_initVGA_data[][4] = {
14650c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x01, 0xcc},
14660c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
14670c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
14680c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x20, 0xdd},
14690c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x24, 0xcc},
14700c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x25, 0xcc},
14710c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
14720c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
14730c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
14740c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x03, 0xcc},
14750c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x45, 0xcc},
14760c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0b, 0xcc},
14770c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},
14780c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
14790c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
14800c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x01, 0xcc},
14810c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},
14820c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
14830c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x02, 0xcc},
14840c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},
14850c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x7f, 0xcc},
14860c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x01, 0xcc},
14870c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0x91, 0xcc},	/* i2c add: 11 */
14880c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x27, 0xcc},
14890c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0x73, 0xcc},
14900c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x23, 0xcc},
14910c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2c, 0x50, 0xcc},
14920c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2d, 0xf8, 0xcc},
14930c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2e, 0xf8, 0xcc},
14940c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2f, 0xf8, 0xcc},
14950c0d06caSMauro Carvalho Chehab 	{0xb8, 0x30, 0x50, 0xcc},
14960c0d06caSMauro Carvalho Chehab 	{0xb8, 0x31, 0xf8, 0xcc},
14970c0d06caSMauro Carvalho Chehab 	{0xb8, 0x32, 0xf8, 0xcc},
14980c0d06caSMauro Carvalho Chehab 	{0xb8, 0x33, 0xf8, 0xcc},
14990c0d06caSMauro Carvalho Chehab 	{0xb8, 0x34, 0x58, 0xcc},
15000c0d06caSMauro Carvalho Chehab 	{0xb8, 0x35, 0x00, 0xcc},
15010c0d06caSMauro Carvalho Chehab 	{0xb8, 0x36, 0x00, 0xcc},
15020c0d06caSMauro Carvalho Chehab 	{0xb8, 0x37, 0x00, 0xcc},
15030c0d06caSMauro Carvalho Chehab 	{0xb8, 0x27, 0x20, 0xcc},
15040c0d06caSMauro Carvalho Chehab 	{0xb8, 0x01, 0x7d, 0xcc},
15050c0d06caSMauro Carvalho Chehab 	{0xb8, 0x81, 0x09, 0xcc},
15060c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
15070c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},
15080c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8f, 0xff, 0xcc},
15090c0d06caSMauro Carvalho Chehab 	{0x00, 0x01, 0x0c, 0xaa},
15100c0d06caSMauro Carvalho Chehab 	{0x00, 0x14, 0x01, 0xaa},
15110c0d06caSMauro Carvalho Chehab 	{0x00, 0x15, 0xe6, 0xaa},
15120c0d06caSMauro Carvalho Chehab 	{0x00, 0x16, 0x02, 0xaa},
15130c0d06caSMauro Carvalho Chehab 	{0x00, 0x17, 0x86, 0xaa},
15140c0d06caSMauro Carvalho Chehab 	{0x00, 0x23, 0x00, 0xaa},
15150c0d06caSMauro Carvalho Chehab 	{0x00, 0x25, 0x03, 0xaa},
15160c0d06caSMauro Carvalho Chehab 	{0x00, 0x26, 0xa9, 0xaa},
15170c0d06caSMauro Carvalho Chehab 	{0x00, 0x27, 0x80, 0xaa},
15180c0d06caSMauro Carvalho Chehab 	{0x00, 0x30, 0x18, 0xaa},
15190c0d06caSMauro Carvalho Chehab 	{0xb6, 0x00, 0x00, 0xcc},
15200c0d06caSMauro Carvalho Chehab 	{0xb6, 0x03, 0x02, 0xcc},
15210c0d06caSMauro Carvalho Chehab 	{0xb6, 0x02, 0x80, 0xcc},
15220c0d06caSMauro Carvalho Chehab 	{0xb6, 0x05, 0x01, 0xcc},
15230c0d06caSMauro Carvalho Chehab 	{0xb6, 0x04, 0xe0, 0xcc},
15240c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0x78, 0xcc},
15250c0d06caSMauro Carvalho Chehab 	{0xb6, 0x18, 0x02, 0xcc},
15260c0d06caSMauro Carvalho Chehab 	{0xb6, 0x17, 0x58, 0xcc},
15270c0d06caSMauro Carvalho Chehab 	{0xb6, 0x16, 0x00, 0xcc},
15280c0d06caSMauro Carvalho Chehab 	{0xb6, 0x22, 0x12, 0xcc},
15290c0d06caSMauro Carvalho Chehab 	{0xb6, 0x23, 0x0b, 0xcc},
15300c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x02, 0xcc},
15310c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x39, 0xcc},
15320c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x04, 0xcc},
15330c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x10, 0xcc},
15340c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0xf8, 0xcc},
15350c0d06caSMauro Carvalho Chehab 	{0xb6, 0x13, 0x13, 0xcc},
15360c0d06caSMauro Carvalho Chehab 	{0xb9, 0x12, 0x00, 0xcc},
15370c0d06caSMauro Carvalho Chehab 	{0xb9, 0x13, 0x0a, 0xcc},
15380c0d06caSMauro Carvalho Chehab 	{0xb9, 0x14, 0x0a, 0xcc},
15390c0d06caSMauro Carvalho Chehab 	{0xb9, 0x15, 0x0a, 0xcc},
15400c0d06caSMauro Carvalho Chehab 	{0xb9, 0x16, 0x0a, 0xcc},
15410c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0c, 0x20, 0xcc},
15420c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0d, 0x70, 0xcc},
15430c0d06caSMauro Carvalho Chehab 	{0xb9, 0x18, 0x00, 0xcc},
15440c0d06caSMauro Carvalho Chehab 	{0xb9, 0x19, 0x0f, 0xcc},
15450c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1a, 0x0f, 0xcc},
15460c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1b, 0x0f, 0xcc},
15470c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1c, 0x0f, 0xcc},
15480c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
15490c0d06caSMauro Carvalho Chehab 	{}
15500c0d06caSMauro Carvalho Chehab };
15510c0d06caSMauro Carvalho Chehab 
15520c0d06caSMauro Carvalho Chehab static const u8 hv7131r_initQVGA_data[][4] = {
15530c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x01, 0xcc},
15540c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
15550c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
15560c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x20, 0xdd},
15570c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x24, 0xcc},
15580c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x25, 0xcc},
15590c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
15600c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
15610c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
15620c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x03, 0xcc},
15630c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x45, 0xcc},
15640c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x0b, 0xcc},
15650c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},
15660c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
15670c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
15680c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x01, 0xcc},
15690c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},
15700c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
15710c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x02, 0xcc},
15720c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},
15730c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x7f, 0xcc},
15740c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x01, 0xcc},
15750c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0x91, 0xcc},
15760c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x27, 0xcc},
15770c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0xd3, 0xcc},
15780c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x23, 0xcc},
15790c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2c, 0x50, 0xcc},
15800c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2d, 0xf8, 0xcc},
15810c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2e, 0xf8, 0xcc},
15820c0d06caSMauro Carvalho Chehab 	{0xb8, 0x2f, 0xf8, 0xcc},
15830c0d06caSMauro Carvalho Chehab 	{0xb8, 0x30, 0x50, 0xcc},
15840c0d06caSMauro Carvalho Chehab 	{0xb8, 0x31, 0xf8, 0xcc},
15850c0d06caSMauro Carvalho Chehab 	{0xb8, 0x32, 0xf8, 0xcc},
15860c0d06caSMauro Carvalho Chehab 	{0xb8, 0x33, 0xf8, 0xcc},
15870c0d06caSMauro Carvalho Chehab 	{0xb8, 0x34, 0x58, 0xcc},
15880c0d06caSMauro Carvalho Chehab 	{0xb8, 0x35, 0x00, 0xcc},
15890c0d06caSMauro Carvalho Chehab 	{0xb8, 0x36, 0x00, 0xcc},
15900c0d06caSMauro Carvalho Chehab 	{0xb8, 0x37, 0x00, 0xcc},
15910c0d06caSMauro Carvalho Chehab 	{0xb8, 0x27, 0x20, 0xcc},
15920c0d06caSMauro Carvalho Chehab 	{0xb8, 0x01, 0x7d, 0xcc},
15930c0d06caSMauro Carvalho Chehab 	{0xb8, 0x81, 0x09, 0xcc},
15940c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
15950c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},
15960c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8f, 0xff, 0xcc},
15970c0d06caSMauro Carvalho Chehab 	{0x00, 0x01, 0x0c, 0xaa},
15980c0d06caSMauro Carvalho Chehab 	{0x00, 0x14, 0x01, 0xaa},
15990c0d06caSMauro Carvalho Chehab 	{0x00, 0x15, 0xe6, 0xaa},
16000c0d06caSMauro Carvalho Chehab 	{0x00, 0x16, 0x02, 0xaa},
16010c0d06caSMauro Carvalho Chehab 	{0x00, 0x17, 0x86, 0xaa},
16020c0d06caSMauro Carvalho Chehab 	{0x00, 0x23, 0x00, 0xaa},
16030c0d06caSMauro Carvalho Chehab 	{0x00, 0x25, 0x03, 0xaa},
16040c0d06caSMauro Carvalho Chehab 	{0x00, 0x26, 0xa9, 0xaa},
16050c0d06caSMauro Carvalho Chehab 	{0x00, 0x27, 0x80, 0xaa},
16060c0d06caSMauro Carvalho Chehab 	{0x00, 0x30, 0x18, 0xaa},
16070c0d06caSMauro Carvalho Chehab 	{0xb6, 0x00, 0x00, 0xcc},
16080c0d06caSMauro Carvalho Chehab 	{0xb6, 0x03, 0x01, 0xcc},
16090c0d06caSMauro Carvalho Chehab 	{0xb6, 0x02, 0x40, 0xcc},
16100c0d06caSMauro Carvalho Chehab 	{0xb6, 0x05, 0x00, 0xcc},
16110c0d06caSMauro Carvalho Chehab 	{0xb6, 0x04, 0xf0, 0xcc},
16120c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0x78, 0xcc},
16130c0d06caSMauro Carvalho Chehab 	{0xb6, 0x18, 0x00, 0xcc},
16140c0d06caSMauro Carvalho Chehab 	{0xb6, 0x17, 0x96, 0xcc},
16150c0d06caSMauro Carvalho Chehab 	{0xb6, 0x16, 0x00, 0xcc},
16160c0d06caSMauro Carvalho Chehab 	{0xb6, 0x22, 0x12, 0xcc},
16170c0d06caSMauro Carvalho Chehab 	{0xb6, 0x23, 0x0b, 0xcc},
16180c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x02, 0xcc},
16190c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x39, 0xcc},
16200c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x04, 0xcc},
16210c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x10, 0xcc},
16220c0d06caSMauro Carvalho Chehab 	{0xbc, 0x02, 0x18, 0xcc},
16230c0d06caSMauro Carvalho Chehab 	{0xbc, 0x03, 0x50, 0xcc},
16240c0d06caSMauro Carvalho Chehab 	{0xbc, 0x04, 0x18, 0xcc},
16250c0d06caSMauro Carvalho Chehab 	{0xbc, 0x05, 0x00, 0xcc},
16260c0d06caSMauro Carvalho Chehab 	{0xbc, 0x06, 0x00, 0xcc},
16270c0d06caSMauro Carvalho Chehab 	{0xbc, 0x08, 0x30, 0xcc},
16280c0d06caSMauro Carvalho Chehab 	{0xbc, 0x09, 0x40, 0xcc},
16290c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0a, 0x10, 0xcc},
16300c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0b, 0x00, 0xcc},
16310c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0c, 0x00, 0xcc},
16320c0d06caSMauro Carvalho Chehab 	{0xb9, 0x12, 0x00, 0xcc},
16330c0d06caSMauro Carvalho Chehab 	{0xb9, 0x13, 0x0a, 0xcc},
16340c0d06caSMauro Carvalho Chehab 	{0xb9, 0x14, 0x0a, 0xcc},
16350c0d06caSMauro Carvalho Chehab 	{0xb9, 0x15, 0x0a, 0xcc},
16360c0d06caSMauro Carvalho Chehab 	{0xb9, 0x16, 0x0a, 0xcc},
16370c0d06caSMauro Carvalho Chehab 	{0xb9, 0x18, 0x00, 0xcc},
16380c0d06caSMauro Carvalho Chehab 	{0xb9, 0x19, 0x0f, 0xcc},
16390c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0c, 0x20, 0xcc},
16400c0d06caSMauro Carvalho Chehab 	{0xb8, 0x0d, 0x70, 0xcc},
16410c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1a, 0x0f, 0xcc},
16420c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1b, 0x0f, 0xcc},
16430c0d06caSMauro Carvalho Chehab 	{0xb9, 0x1c, 0x0f, 0xcc},
16440c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0xf8, 0xcc},
16450c0d06caSMauro Carvalho Chehab 	{0xb6, 0x13, 0x13, 0xcc},
16460c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
16470c0d06caSMauro Carvalho Chehab 	{}
16480c0d06caSMauro Carvalho Chehab };
16490c0d06caSMauro Carvalho Chehab 
16500c0d06caSMauro Carvalho Chehab static const u8 ov7660_gamma[17] = {
16510c0d06caSMauro Carvalho Chehab 	0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
16520c0d06caSMauro Carvalho Chehab 	0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff
16530c0d06caSMauro Carvalho Chehab };
16540c0d06caSMauro Carvalho Chehab static const u8 ov7660_matrix[9] = {
16550c0d06caSMauro Carvalho Chehab 	0x5a, 0xf0, 0xf6, 0xf3, 0x57, 0xf6, 0xf3, 0xef, 0x62
16560c0d06caSMauro Carvalho Chehab };
16570c0d06caSMauro Carvalho Chehab static const u8 ov7660_initVGA_data[][4] = {
16580c0d06caSMauro Carvalho Chehab 	{0xb0, 0x4d, 0x00, 0xcc},	{0xb3, 0x01, 0x01, 0xcc},
16590c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x50, 0xdd},
16600c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x01, 0xcc},
16610c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x21, 0xcc},	{0xb3, 0x00, 0x26, 0xcc},
16620c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
16630c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x03, 0xcc},
16640c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x1f, 0xcc},	{0xb3, 0x04, 0x05, 0xcc},
16650c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x00, 0xcc},
16660c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},
16670c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},/* 0xb315  <-0 href startl */
16680c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},	{0xb3, 0x17, 0x7f, 0xcc},
16690c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
16700c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},	{0xb3, 0x1d, 0x01, 0xcc},
16710c0d06caSMauro Carvalho Chehab 	{0xb3, 0x1f, 0x02, 0xcc},
16720c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x01, 0xcc},
16730c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xa1, 0xcc},	/* i2c add: 21 */
16740c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x26, 0xcc},
16750c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x33, 0xcc}, /* 13 */
16760c0d06caSMauro Carvalho Chehab 	{0xb8, 0x01, 0x7d, 0xcc},
16770c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0x73, 0xcc},	{0xb8, 0x81, 0x09, 0xcc},
16780c0d06caSMauro Carvalho Chehab 	{0xb8, 0x27, 0x20, 0xcc},
16790c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8f, 0x50, 0xcc},
16800c0d06caSMauro Carvalho Chehab 	{0x00, 0x01, 0x80, 0xaa},	{0x00, 0x02, 0x80, 0xaa},
16810c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x80, 0xaa},
16820c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x05, 0xaa},
16830c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0x01, 0xaa},	/* MVFP */
16840c0d06caSMauro Carvalho Chehab 	{0x00, 0x3d, 0x40, 0xaa}, /* 0x3d <-40 gamma 01 */
16850c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0x00, 0xaa}, /* edge 00 */
16860c0d06caSMauro Carvalho Chehab 	{0x00, 0x0d, 0x48, 0xaa},	{0x00, 0x0e, 0x04, 0xaa},
16870c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0xa7, 0xaa},
16880c0d06caSMauro Carvalho Chehab 	{0x00, 0x40, 0xc1, 0xaa},	{0x00, 0x35, 0x00, 0xaa},
16890c0d06caSMauro Carvalho Chehab 	{0x00, 0x36, 0x00, 0xaa},
16900c0d06caSMauro Carvalho Chehab 	{0x00, 0x3c, 0x68, 0xaa},	{0x00, 0x1b, 0x05, 0xaa},
16910c0d06caSMauro Carvalho Chehab 	{0x00, 0x39, 0x43, 0xaa},
16920c0d06caSMauro Carvalho Chehab 	{0x00, 0x8d, 0xcf, 0xaa},
16930c0d06caSMauro Carvalho Chehab 	{0x00, 0x8b, 0xcc, 0xaa},	{0x00, 0x8c, 0xcc, 0xaa},
16940c0d06caSMauro Carvalho Chehab 	{0x00, 0x0f, 0x62, 0xaa},
16950c0d06caSMauro Carvalho Chehab 	{0x00, 0x35, 0x84, 0xaa},
16960c0d06caSMauro Carvalho Chehab 	{0x00, 0x3b, 0x08, 0xaa}, /* 0 * Nightframe 1/4 + 50Hz -> 0xC8 */
16970c0d06caSMauro Carvalho Chehab 	{0x00, 0x3a, 0x00, 0xaa}, /* mx change yuyv format 00, 04, 01; 08, 0c*/
16980c0d06caSMauro Carvalho Chehab 	{0x00, 0x14, 0x2a, 0xaa}, /* agc ampli */
16990c0d06caSMauro Carvalho Chehab 	{0x00, 0x9e, 0x40, 0xaa},	{0xb8, 0x8f, 0x50, 0xcc},
17000c0d06caSMauro Carvalho Chehab 	{0x00, 0x01, 0x80, 0xaa},
17010c0d06caSMauro Carvalho Chehab 	{0x00, 0x02, 0x80, 0xaa},
17020c0d06caSMauro Carvalho Chehab 	{0xb8, 0xfe, 0x00, 0xcc},	{0xb8, 0xff, 0x28, 0xcc},
17030c0d06caSMauro Carvalho Chehab 	{0xb9, 0x00, 0x28, 0xcc},
17040c0d06caSMauro Carvalho Chehab 	{0xb9, 0x01, 0x28, 0xcc},	{0xb9, 0x02, 0x28, 0xcc},
17050c0d06caSMauro Carvalho Chehab 	{0xb9, 0x03, 0x00, 0xcc},
17060c0d06caSMauro Carvalho Chehab 	{0xb9, 0x04, 0x00, 0xcc},
17070c0d06caSMauro Carvalho Chehab 	{0xb9, 0x05, 0x3c, 0xcc},	{0xb9, 0x06, 0x3c, 0xcc},
17080c0d06caSMauro Carvalho Chehab 	{0xb9, 0x07, 0x3c, 0xcc},
17090c0d06caSMauro Carvalho Chehab 	{0xb9, 0x08, 0x3c, 0xcc},
17100c0d06caSMauro Carvalho Chehab 
17110c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},	{0xb8, 0x8f, 0xff, 0xcc},
17120c0d06caSMauro Carvalho Chehab 
17130c0d06caSMauro Carvalho Chehab 	{0x00, 0x29, 0x3c, 0xaa},	{0xb3, 0x01, 0x45, 0xcc},
17140c0d06caSMauro Carvalho Chehab 	{}
17150c0d06caSMauro Carvalho Chehab };
17160c0d06caSMauro Carvalho Chehab static const u8 ov7660_initQVGA_data[][4] = {
17170c0d06caSMauro Carvalho Chehab 	{0xb0, 0x4d, 0x00, 0xcc},	{0xb3, 0x01, 0x01, 0xcc},
17180c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x50, 0xdd},	{0xb0, 0x03, 0x01, 0xcc},
17190c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x21, 0xcc},	{0xb3, 0x00, 0x26, 0xcc},
17200c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},	{0xb3, 0x06, 0x03, 0xcc},
17210c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x1f, 0xcc},	{0xb3, 0x04, 0x05, 0xcc},
17220c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x00, 0xcc},	{0xb3, 0x06, 0x01, 0xcc},
17230c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},/* 0xb315  <-0 href startl */
17240c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},	{0xb3, 0x17, 0x7f, 0xcc},
17250c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
17260c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},	{0xb3, 0x1d, 0x01, 0xcc},
17270c0d06caSMauro Carvalho Chehab 	{0xb3, 0x1f, 0x02, 0xcc},	{0xb3, 0x34, 0x01, 0xcc},
17280c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xa1, 0xcc},	{0xb3, 0x00, 0x26, 0xcc},
17290c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x33, 0xcc}, /* 13 */
17300c0d06caSMauro Carvalho Chehab 	{0xb8, 0x01, 0x7d, 0xcc},
17310c0d06caSMauro Carvalho Chehab /* sizer */
17320c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0xd3, 0xcc},
17330c0d06caSMauro Carvalho Chehab 	{0xb8, 0x81, 0x09, 0xcc},	{0xb8, 0x81, 0x09, 0xcc},
17340c0d06caSMauro Carvalho Chehab 	{0xb8, 0x27, 0x20, 0xcc},	{0xb8, 0x8f, 0x50, 0xcc},
17350c0d06caSMauro Carvalho Chehab 	{0x00, 0x01, 0x80, 0xaa},	{0x00, 0x02, 0x80, 0xaa},
17360c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x80, 0xaa},	{0x00, 0x12, 0x05, 0xaa},
17370c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0x01, 0xaa},	/* MVFP */
17380c0d06caSMauro Carvalho Chehab 	{0x00, 0x3d, 0x40, 0xaa}, /* 0x3d <-40 gamma 01 */
17390c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0x00, 0xaa}, /* edge 00 */
17400c0d06caSMauro Carvalho Chehab 	{0x00, 0x0d, 0x48, 0xaa},	{0x00, 0x0e, 0x04, 0xaa},
17410c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0xa7, 0xaa},
17420c0d06caSMauro Carvalho Chehab 	{0x00, 0x40, 0xc1, 0xaa},	{0x00, 0x35, 0x00, 0xaa},
17430c0d06caSMauro Carvalho Chehab 	{0x00, 0x36, 0x00, 0xaa},
17440c0d06caSMauro Carvalho Chehab 	{0x00, 0x3c, 0x68, 0xaa},	{0x00, 0x1b, 0x05, 0xaa},
17450c0d06caSMauro Carvalho Chehab 	{0x00, 0x39, 0x43, 0xaa},	{0x00, 0x8d, 0xcf, 0xaa},
17460c0d06caSMauro Carvalho Chehab 	{0x00, 0x8b, 0xcc, 0xaa},	{0x00, 0x8c, 0xcc, 0xaa},
17470c0d06caSMauro Carvalho Chehab 	{0x00, 0x0f, 0x62, 0xaa},	{0x00, 0x35, 0x84, 0xaa},
17480c0d06caSMauro Carvalho Chehab 	{0x00, 0x3b, 0x08, 0xaa}, /* 0  * Nightframe 1/4 + 50Hz -> 0xC8 */
17490c0d06caSMauro Carvalho Chehab 	{0x00, 0x3a, 0x00, 0xaa}, /* mx change yuyv format 00, 04, 01; 08, 0c*/
17500c0d06caSMauro Carvalho Chehab 	{0x00, 0x14, 0x2a, 0xaa}, /* agc ampli */
17510c0d06caSMauro Carvalho Chehab 	{0x00, 0x9e, 0x40, 0xaa},	{0xb8, 0x8f, 0x50, 0xcc},
17520c0d06caSMauro Carvalho Chehab 	{0x00, 0x01, 0x80, 0xaa},
17530c0d06caSMauro Carvalho Chehab 	{0x00, 0x02, 0x80, 0xaa},
17540c0d06caSMauro Carvalho Chehab /* sizer filters */
17550c0d06caSMauro Carvalho Chehab 	{0xbc, 0x02, 0x08, 0xcc},
17560c0d06caSMauro Carvalho Chehab 	{0xbc, 0x03, 0x70, 0xcc},
17570c0d06caSMauro Carvalho Chehab 	{0xb8, 0x35, 0x00, 0xcc},
17580c0d06caSMauro Carvalho Chehab 	{0xb8, 0x36, 0x00, 0xcc},
17590c0d06caSMauro Carvalho Chehab 	{0xb8, 0x37, 0x00, 0xcc},
17600c0d06caSMauro Carvalho Chehab 	{0xbc, 0x04, 0x08, 0xcc},
17610c0d06caSMauro Carvalho Chehab 	{0xbc, 0x05, 0x00, 0xcc},
17620c0d06caSMauro Carvalho Chehab 	{0xbc, 0x06, 0x00, 0xcc},
17630c0d06caSMauro Carvalho Chehab 	{0xbc, 0x08, 0x3c, 0xcc},
17640c0d06caSMauro Carvalho Chehab 	{0xbc, 0x09, 0x40, 0xcc},
17650c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0a, 0x04, 0xcc},
17660c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0b, 0x00, 0xcc},
17670c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0c, 0x00, 0xcc},
17680c0d06caSMauro Carvalho Chehab /* */
17690c0d06caSMauro Carvalho Chehab 	{0xb8, 0xfe, 0x00, 0xcc},
17700c0d06caSMauro Carvalho Chehab 	{0xb8, 0xff, 0x28, 0xcc},
17710c0d06caSMauro Carvalho Chehab /* */
17720c0d06caSMauro Carvalho Chehab 	{0xb9, 0x00, 0x28, 0xcc},	{0xb9, 0x01, 0x28, 0xcc},
17730c0d06caSMauro Carvalho Chehab 	{0xb9, 0x02, 0x28, 0xcc},	{0xb9, 0x03, 0x00, 0xcc},
17740c0d06caSMauro Carvalho Chehab 	{0xb9, 0x04, 0x00, 0xcc},	{0xb9, 0x05, 0x3c, 0xcc},
17750c0d06caSMauro Carvalho Chehab 	{0xb9, 0x06, 0x3c, 0xcc},	{0xb9, 0x07, 0x3c, 0xcc},
17760c0d06caSMauro Carvalho Chehab 	{0xb9, 0x08, 0x3c, 0xcc},
17770c0d06caSMauro Carvalho Chehab /* */
17780c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8e, 0x00, 0xcc},
17790c0d06caSMauro Carvalho Chehab 	{0xb8, 0x8f, 0xff, 0xcc}, /* ff */
17800c0d06caSMauro Carvalho Chehab 	{0x00, 0x29, 0x3c, 0xaa},
17810c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x45, 0xcc}, /* 45 */
17820c0d06caSMauro Carvalho Chehab 	{}
17830c0d06caSMauro Carvalho Chehab };
17840c0d06caSMauro Carvalho Chehab 
17850c0d06caSMauro Carvalho Chehab static const u8 ov7660_50HZ[][4] = {
17860c0d06caSMauro Carvalho Chehab 	{0x00, 0x3b, 0x08, 0xaa},
17870c0d06caSMauro Carvalho Chehab 	{0x00, 0x9d, 0x40, 0xaa},
17880c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0xa7, 0xaa},
17890c0d06caSMauro Carvalho Chehab 	{}
17900c0d06caSMauro Carvalho Chehab };
17910c0d06caSMauro Carvalho Chehab 
17920c0d06caSMauro Carvalho Chehab static const u8 ov7660_60HZ[][4] = {
17930c0d06caSMauro Carvalho Chehab 	{0x00, 0x3b, 0x00, 0xaa},
17940c0d06caSMauro Carvalho Chehab 	{0x00, 0x9e, 0x40, 0xaa},
17950c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0xa7, 0xaa},
17960c0d06caSMauro Carvalho Chehab 	{}
17970c0d06caSMauro Carvalho Chehab };
17980c0d06caSMauro Carvalho Chehab 
1799*9a582884SHerman static const u8 ov7660_NoFlicker[][4] = {
18000c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0x87, 0xaa},
18010c0d06caSMauro Carvalho Chehab 	{}
18020c0d06caSMauro Carvalho Chehab };
18030c0d06caSMauro Carvalho Chehab 
18040c0d06caSMauro Carvalho Chehab static const u8 ov7670_InitVGA[][4] = {
18050c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x05, 0xcc},
18060c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x30, 0xdd},
18070c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
18080c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
18090c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
18100c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
18110c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x66, 0xcc},
18120c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
18130c0d06caSMauro Carvalho Chehab 	{0xb0, 0x16, 0x01, 0xcc},
18140c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xa1, 0xcc},	/* i2c add: 21 */
18150c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x01, 0xcc},
18160c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
18170c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},
18180c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
18190c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
18200c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x02, 0xcc},
18210c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x1f, 0xcc},
18220c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
18230c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
18240c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},
18250c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x7f, 0xcc},
18260c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},
18270c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
18280c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
18290c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x01, 0xcc},
18300c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},
18310c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0x41, 0xcc},
18320c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},
18330c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x80, 0xaa},
18340c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x20, 0xdd},
18350c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x00, 0xaa},
18360c0d06caSMauro Carvalho Chehab 	{0x00, 0x11, 0x40, 0xaa},
18370c0d06caSMauro Carvalho Chehab 	{0x00, 0x6b, 0x0a, 0xaa},
18380c0d06caSMauro Carvalho Chehab 	{0x00, 0x3a, 0x04, 0xaa},
18390c0d06caSMauro Carvalho Chehab 	{0x00, 0x40, 0xc0, 0xaa},
18400c0d06caSMauro Carvalho Chehab 	{0x00, 0x8c, 0x00, 0xaa},
18410c0d06caSMauro Carvalho Chehab 	{0x00, 0x7a, 0x29, 0xaa},
18420c0d06caSMauro Carvalho Chehab 	{0x00, 0x7b, 0x0e, 0xaa},
18430c0d06caSMauro Carvalho Chehab 	{0x00, 0x7c, 0x1a, 0xaa},
18440c0d06caSMauro Carvalho Chehab 	{0x00, 0x7d, 0x31, 0xaa},
18450c0d06caSMauro Carvalho Chehab 	{0x00, 0x7e, 0x53, 0xaa},
18460c0d06caSMauro Carvalho Chehab 	{0x00, 0x7f, 0x60, 0xaa},
18470c0d06caSMauro Carvalho Chehab 	{0x00, 0x80, 0x6b, 0xaa},
18480c0d06caSMauro Carvalho Chehab 	{0x00, 0x81, 0x73, 0xaa},
18490c0d06caSMauro Carvalho Chehab 	{0x00, 0x82, 0x7b, 0xaa},
18500c0d06caSMauro Carvalho Chehab 	{0x00, 0x83, 0x82, 0xaa},
18510c0d06caSMauro Carvalho Chehab 	{0x00, 0x84, 0x89, 0xaa},
18520c0d06caSMauro Carvalho Chehab 	{0x00, 0x85, 0x96, 0xaa},
18530c0d06caSMauro Carvalho Chehab 	{0x00, 0x86, 0xa1, 0xaa},
18540c0d06caSMauro Carvalho Chehab 	{0x00, 0x87, 0xb7, 0xaa},
18550c0d06caSMauro Carvalho Chehab 	{0x00, 0x88, 0xcc, 0xaa},
18560c0d06caSMauro Carvalho Chehab 	{0x00, 0x89, 0xe1, 0xaa},
18570c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0xe0, 0xaa},
18580c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x00, 0xaa},
18590c0d06caSMauro Carvalho Chehab 	{0x00, 0x10, 0x00, 0xaa},
18600c0d06caSMauro Carvalho Chehab 	{0x00, 0x0d, 0x40, 0xaa},
18610c0d06caSMauro Carvalho Chehab 	{0x00, 0x14, 0x28, 0xaa},
18620c0d06caSMauro Carvalho Chehab 	{0x00, 0xa5, 0x05, 0xaa},
18630c0d06caSMauro Carvalho Chehab 	{0x00, 0xab, 0x07, 0xaa},
18640c0d06caSMauro Carvalho Chehab 	{0x00, 0x24, 0x95, 0xaa},
18650c0d06caSMauro Carvalho Chehab 	{0x00, 0x25, 0x33, 0xaa},
18660c0d06caSMauro Carvalho Chehab 	{0x00, 0x26, 0xe3, 0xaa},
18670c0d06caSMauro Carvalho Chehab 	{0x00, 0x9f, 0x88, 0xaa},
18680c0d06caSMauro Carvalho Chehab 	{0x00, 0xa0, 0x78, 0xaa},
18690c0d06caSMauro Carvalho Chehab 	{0x00, 0x55, 0x90, 0xaa},
18700c0d06caSMauro Carvalho Chehab 	{0x00, 0xa1, 0x03, 0xaa},
18710c0d06caSMauro Carvalho Chehab 	{0x00, 0xa6, 0xe0, 0xaa},
18720c0d06caSMauro Carvalho Chehab 	{0x00, 0xa7, 0xd8, 0xaa},
18730c0d06caSMauro Carvalho Chehab 	{0x00, 0xa8, 0xf0, 0xaa},
18740c0d06caSMauro Carvalho Chehab 	{0x00, 0xa9, 0x90, 0xaa},
18750c0d06caSMauro Carvalho Chehab 	{0x00, 0xaa, 0x14, 0xaa},
18760c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0xe5, 0xaa},
18770c0d06caSMauro Carvalho Chehab 	{0x00, 0x0e, 0x61, 0xaa},
18780c0d06caSMauro Carvalho Chehab 	{0x00, 0x0f, 0x4b, 0xaa},
18790c0d06caSMauro Carvalho Chehab 	{0x00, 0x16, 0x02, 0xaa},
18800c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0x07, 0xaa},	/* MVFP */
18810c0d06caSMauro Carvalho Chehab 	{0x00, 0x21, 0x02, 0xaa},
18820c0d06caSMauro Carvalho Chehab 	{0x00, 0x22, 0x91, 0xaa},
18830c0d06caSMauro Carvalho Chehab 	{0x00, 0x29, 0x07, 0xaa},
18840c0d06caSMauro Carvalho Chehab 	{0x00, 0x33, 0x0b, 0xaa},
18850c0d06caSMauro Carvalho Chehab 	{0x00, 0x35, 0x0b, 0xaa},
18860c0d06caSMauro Carvalho Chehab 	{0x00, 0x37, 0x1d, 0xaa},
18870c0d06caSMauro Carvalho Chehab 	{0x00, 0x38, 0x71, 0xaa},
18880c0d06caSMauro Carvalho Chehab 	{0x00, 0x39, 0x2a, 0xaa},
18890c0d06caSMauro Carvalho Chehab 	{0x00, 0x3c, 0x78, 0xaa},
18900c0d06caSMauro Carvalho Chehab 	{0x00, 0x4d, 0x40, 0xaa},
18910c0d06caSMauro Carvalho Chehab 	{0x00, 0x4e, 0x20, 0xaa},
18920c0d06caSMauro Carvalho Chehab 	{0x00, 0x74, 0x19, 0xaa},
18930c0d06caSMauro Carvalho Chehab 	{0x00, 0x8d, 0x4f, 0xaa},
18940c0d06caSMauro Carvalho Chehab 	{0x00, 0x8e, 0x00, 0xaa},
18950c0d06caSMauro Carvalho Chehab 	{0x00, 0x8f, 0x00, 0xaa},
18960c0d06caSMauro Carvalho Chehab 	{0x00, 0x90, 0x00, 0xaa},
18970c0d06caSMauro Carvalho Chehab 	{0x00, 0x91, 0x00, 0xaa},
18980c0d06caSMauro Carvalho Chehab 	{0x00, 0x96, 0x00, 0xaa},
18990c0d06caSMauro Carvalho Chehab 	{0x00, 0x9a, 0x80, 0xaa},
19000c0d06caSMauro Carvalho Chehab 	{0x00, 0xb0, 0x84, 0xaa},
19010c0d06caSMauro Carvalho Chehab 	{0x00, 0xb1, 0x0c, 0xaa},
19020c0d06caSMauro Carvalho Chehab 	{0x00, 0xb2, 0x0e, 0xaa},
19030c0d06caSMauro Carvalho Chehab 	{0x00, 0xb3, 0x82, 0xaa},
19040c0d06caSMauro Carvalho Chehab 	{0x00, 0xb8, 0x0a, 0xaa},
19050c0d06caSMauro Carvalho Chehab 	{0x00, 0x43, 0x14, 0xaa},
19060c0d06caSMauro Carvalho Chehab 	{0x00, 0x44, 0xf0, 0xaa},
19070c0d06caSMauro Carvalho Chehab 	{0x00, 0x45, 0x45, 0xaa},
19080c0d06caSMauro Carvalho Chehab 	{0x00, 0x46, 0x63, 0xaa},
19090c0d06caSMauro Carvalho Chehab 	{0x00, 0x47, 0x2d, 0xaa},
19100c0d06caSMauro Carvalho Chehab 	{0x00, 0x48, 0x46, 0xaa},
19110c0d06caSMauro Carvalho Chehab 	{0x00, 0x59, 0x88, 0xaa},
19120c0d06caSMauro Carvalho Chehab 	{0x00, 0x5a, 0xa0, 0xaa},
19130c0d06caSMauro Carvalho Chehab 	{0x00, 0x5b, 0xc6, 0xaa},
19140c0d06caSMauro Carvalho Chehab 	{0x00, 0x5c, 0x7d, 0xaa},
19150c0d06caSMauro Carvalho Chehab 	{0x00, 0x5d, 0x5f, 0xaa},
19160c0d06caSMauro Carvalho Chehab 	{0x00, 0x5e, 0x19, 0xaa},
19170c0d06caSMauro Carvalho Chehab 	{0x00, 0x6c, 0x0a, 0xaa},
19180c0d06caSMauro Carvalho Chehab 	{0x00, 0x6d, 0x55, 0xaa},
19190c0d06caSMauro Carvalho Chehab 	{0x00, 0x6e, 0x11, 0xaa},
19200c0d06caSMauro Carvalho Chehab 	{0x00, 0x6f, 0x9e, 0xaa},
19210c0d06caSMauro Carvalho Chehab 	{0x00, 0x69, 0x00, 0xaa},
19220c0d06caSMauro Carvalho Chehab 	{0x00, 0x6a, 0x40, 0xaa},
19230c0d06caSMauro Carvalho Chehab 	{0x00, 0x01, 0x40, 0xaa},
19240c0d06caSMauro Carvalho Chehab 	{0x00, 0x02, 0x40, 0xaa},
19250c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0xe7, 0xaa},
19260c0d06caSMauro Carvalho Chehab 	{0x00, 0x5f, 0xf0, 0xaa},
19270c0d06caSMauro Carvalho Chehab 	{0x00, 0x60, 0xf0, 0xaa},
19280c0d06caSMauro Carvalho Chehab 	{0x00, 0x61, 0xf0, 0xaa},
19290c0d06caSMauro Carvalho Chehab 	{0x00, 0x27, 0xa0, 0xaa},
19300c0d06caSMauro Carvalho Chehab 	{0x00, 0x28, 0x80, 0xaa},
19310c0d06caSMauro Carvalho Chehab 	{0x00, 0x2c, 0x90, 0xaa},
19320c0d06caSMauro Carvalho Chehab 	{0x00, 0x4f, 0x66, 0xaa},
19330c0d06caSMauro Carvalho Chehab 	{0x00, 0x50, 0x66, 0xaa},
19340c0d06caSMauro Carvalho Chehab 	{0x00, 0x51, 0x00, 0xaa},
19350c0d06caSMauro Carvalho Chehab 	{0x00, 0x52, 0x22, 0xaa},
19360c0d06caSMauro Carvalho Chehab 	{0x00, 0x53, 0x5e, 0xaa},
19370c0d06caSMauro Carvalho Chehab 	{0x00, 0x54, 0x80, 0xaa},
19380c0d06caSMauro Carvalho Chehab 	{0x00, 0x58, 0x9e, 0xaa},
19390c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0x08, 0xaa},
19400c0d06caSMauro Carvalho Chehab 	{0x00, 0x3f, 0x00, 0xaa},
19410c0d06caSMauro Carvalho Chehab 	{0x00, 0x75, 0x85, 0xaa},
19420c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0xe1, 0xaa},
19430c0d06caSMauro Carvalho Chehab 	{0x00, 0x4c, 0x00, 0xaa},
19440c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x0a, 0xaa},
19450c0d06caSMauro Carvalho Chehab 	{0x00, 0x3d, 0x88, 0xaa},
19460c0d06caSMauro Carvalho Chehab 	{0x00, 0x4b, 0x09, 0xaa},
19470c0d06caSMauro Carvalho Chehab 	{0x00, 0xc9, 0x60, 0xaa},
19480c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0x38, 0xaa},
19490c0d06caSMauro Carvalho Chehab 	{0x00, 0x62, 0x30, 0xaa},
19500c0d06caSMauro Carvalho Chehab 	{0x00, 0x63, 0x30, 0xaa},
19510c0d06caSMauro Carvalho Chehab 	{0x00, 0x64, 0x08, 0xaa},
19520c0d06caSMauro Carvalho Chehab 	{0x00, 0x94, 0x07, 0xaa},
19530c0d06caSMauro Carvalho Chehab 	{0x00, 0x95, 0x0b, 0xaa},
19540c0d06caSMauro Carvalho Chehab 	{0x00, 0x65, 0x00, 0xaa},
19550c0d06caSMauro Carvalho Chehab 	{0x00, 0x66, 0x05, 0xaa},
19560c0d06caSMauro Carvalho Chehab 	{0x00, 0x56, 0x50, 0xaa},
19570c0d06caSMauro Carvalho Chehab 	{0x00, 0x34, 0x11, 0xaa},
19580c0d06caSMauro Carvalho Chehab 	{0x00, 0xa4, 0x88, 0xaa},
19590c0d06caSMauro Carvalho Chehab 	{0x00, 0x96, 0x00, 0xaa},
19600c0d06caSMauro Carvalho Chehab 	{0x00, 0x97, 0x30, 0xaa},
19610c0d06caSMauro Carvalho Chehab 	{0x00, 0x98, 0x20, 0xaa},
19620c0d06caSMauro Carvalho Chehab 	{0x00, 0x99, 0x30, 0xaa},
19630c0d06caSMauro Carvalho Chehab 	{0x00, 0x9a, 0x84, 0xaa},
19640c0d06caSMauro Carvalho Chehab 	{0x00, 0x9b, 0x29, 0xaa},
19650c0d06caSMauro Carvalho Chehab 	{0x00, 0x9c, 0x03, 0xaa},
19660c0d06caSMauro Carvalho Chehab 	{0x00, 0x78, 0x04, 0xaa},
19670c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x01, 0xaa},
19680c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0xf0, 0xaa},
19690c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x0f, 0xaa},
19700c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x00, 0xaa},
19710c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x10, 0xaa},
19720c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x7e, 0xaa},
19730c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x0a, 0xaa},
19740c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x80, 0xaa},
19750c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x0b, 0xaa},
19760c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x01, 0xaa},
19770c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x0c, 0xaa},
19780c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x0f, 0xaa},
19790c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x0d, 0xaa},
19800c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x20, 0xaa},
19810c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x09, 0xaa},
19820c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x80, 0xaa},
19830c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x02, 0xaa},
19840c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0xc0, 0xaa},
19850c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x03, 0xaa},
19860c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x40, 0xaa},
19870c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x05, 0xaa},
19880c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x30, 0xaa},
19890c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x26, 0xaa},
19900c0d06caSMauro Carvalho Chehab 	{0x00, 0x11, 0x40, 0xaa},
19910c0d06caSMauro Carvalho Chehab 	{0x00, 0x3a, 0x04, 0xaa},
19920c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x00, 0xaa},
19930c0d06caSMauro Carvalho Chehab 	{0x00, 0x40, 0xc0, 0xaa},
19940c0d06caSMauro Carvalho Chehab 	{0x00, 0x8c, 0x00, 0xaa},
19950c0d06caSMauro Carvalho Chehab 	{0x00, 0x17, 0x14, 0xaa},
19960c0d06caSMauro Carvalho Chehab 	{0x00, 0x18, 0x02, 0xaa},
19970c0d06caSMauro Carvalho Chehab 	{0x00, 0x32, 0x92, 0xaa},
19980c0d06caSMauro Carvalho Chehab 	{0x00, 0x19, 0x02, 0xaa},
19990c0d06caSMauro Carvalho Chehab 	{0x00, 0x1a, 0x7a, 0xaa},
20000c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x0a, 0xaa},
20010c0d06caSMauro Carvalho Chehab 	{0x00, 0x0c, 0x00, 0xaa},
20020c0d06caSMauro Carvalho Chehab 	{0x00, 0x3e, 0x00, 0xaa},
20030c0d06caSMauro Carvalho Chehab 	{0x00, 0x70, 0x3a, 0xaa},
20040c0d06caSMauro Carvalho Chehab 	{0x00, 0x71, 0x35, 0xaa},
20050c0d06caSMauro Carvalho Chehab 	{0x00, 0x72, 0x11, 0xaa},
20060c0d06caSMauro Carvalho Chehab 	{0x00, 0x73, 0xf0, 0xaa},
20070c0d06caSMauro Carvalho Chehab 	{0x00, 0xa2, 0x02, 0xaa},
20080c0d06caSMauro Carvalho Chehab 	{0x00, 0xb1, 0x00, 0xaa},
20090c0d06caSMauro Carvalho Chehab 	{0x00, 0xb1, 0x0c, 0xaa},
20100c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0x37, 0xaa},	/* MVFP */
20110c0d06caSMauro Carvalho Chehab 	{0x00, 0xaa, 0x14, 0xaa},
20120c0d06caSMauro Carvalho Chehab 	{0x00, 0x24, 0x80, 0xaa},
20130c0d06caSMauro Carvalho Chehab 	{0x00, 0x25, 0x74, 0xaa},
20140c0d06caSMauro Carvalho Chehab 	{0x00, 0x26, 0xd3, 0xaa},
20150c0d06caSMauro Carvalho Chehab 	{0x00, 0x0d, 0x00, 0xaa},
20160c0d06caSMauro Carvalho Chehab 	{0x00, 0x14, 0x18, 0xaa},
20170c0d06caSMauro Carvalho Chehab 	{0x00, 0x9d, 0x99, 0xaa},
20180c0d06caSMauro Carvalho Chehab 	{0x00, 0x9e, 0x7f, 0xaa},
20190c0d06caSMauro Carvalho Chehab 	{0x00, 0x64, 0x08, 0xaa},
20200c0d06caSMauro Carvalho Chehab 	{0x00, 0x94, 0x07, 0xaa},
20210c0d06caSMauro Carvalho Chehab 	{0x00, 0x95, 0x06, 0xaa},
20220c0d06caSMauro Carvalho Chehab 	{0x00, 0x66, 0x05, 0xaa},
20230c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0x08, 0xaa},
20240c0d06caSMauro Carvalho Chehab 	{0x00, 0x3f, 0x00, 0xaa},
20250c0d06caSMauro Carvalho Chehab 	{0x00, 0x75, 0x07, 0xaa},
20260c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0xe1, 0xaa},
20270c0d06caSMauro Carvalho Chehab 	{0x00, 0x4c, 0x00, 0xaa},
20280c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x00, 0xaa},
20290c0d06caSMauro Carvalho Chehab 	{0x00, 0x3d, 0xc2, 0xaa},
20300c0d06caSMauro Carvalho Chehab 	{0x00, 0x4b, 0x09, 0xaa},
20310c0d06caSMauro Carvalho Chehab 	{0x00, 0xc9, 0x60, 0xaa},
20320c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0x38, 0xaa},
20330c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x26, 0xcc},
20340c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x02, 0xcc},
20350c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x04, 0xcc},
20360c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
20370c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x45, 0xcc},
20380c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x05, 0xaa},
20390c0d06caSMauro Carvalho Chehab 	{},
20400c0d06caSMauro Carvalho Chehab };
20410c0d06caSMauro Carvalho Chehab 
20420c0d06caSMauro Carvalho Chehab static const u8 ov7670_InitQVGA[][4] = {
20430c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x05, 0xcc},
20440c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x30, 0xdd},
20450c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
20460c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
20470c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
20480c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
20490c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x66, 0xcc},
20500c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
20510c0d06caSMauro Carvalho Chehab 	{0xb0, 0x16, 0x01, 0xcc},
20520c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xa1, 0xcc},	/* i2c add: 21 */
20530c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x01, 0xcc},
20540c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
20550c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},
20560c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
20570c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
20580c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0x02, 0xcc},
20590c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x1f, 0xcc},
20600c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
20610c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
20620c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},
20630c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x7f, 0xcc},
20640c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x05, 0xcc},
20650c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
20660c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
20670c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x01, 0xcc},
20680c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},
20690c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0xd1, 0xcc},
20700c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},
20710c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x80, 0xaa},
20720c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x20, 0xdd},
20730c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x00, 0xaa},
20740c0d06caSMauro Carvalho Chehab 	{0x00, 0x11, 0x40, 0xaa},
20750c0d06caSMauro Carvalho Chehab 	{0x00, 0x6b, 0x0a, 0xaa},
20760c0d06caSMauro Carvalho Chehab 	{0x00, 0x3a, 0x04, 0xaa},
20770c0d06caSMauro Carvalho Chehab 	{0x00, 0x40, 0xc0, 0xaa},
20780c0d06caSMauro Carvalho Chehab 	{0x00, 0x8c, 0x00, 0xaa},
20790c0d06caSMauro Carvalho Chehab 	{0x00, 0x7a, 0x29, 0xaa},
20800c0d06caSMauro Carvalho Chehab 	{0x00, 0x7b, 0x0e, 0xaa},
20810c0d06caSMauro Carvalho Chehab 	{0x00, 0x7c, 0x1a, 0xaa},
20820c0d06caSMauro Carvalho Chehab 	{0x00, 0x7d, 0x31, 0xaa},
20830c0d06caSMauro Carvalho Chehab 	{0x00, 0x7e, 0x53, 0xaa},
20840c0d06caSMauro Carvalho Chehab 	{0x00, 0x7f, 0x60, 0xaa},
20850c0d06caSMauro Carvalho Chehab 	{0x00, 0x80, 0x6b, 0xaa},
20860c0d06caSMauro Carvalho Chehab 	{0x00, 0x81, 0x73, 0xaa},
20870c0d06caSMauro Carvalho Chehab 	{0x00, 0x82, 0x7b, 0xaa},
20880c0d06caSMauro Carvalho Chehab 	{0x00, 0x83, 0x82, 0xaa},
20890c0d06caSMauro Carvalho Chehab 	{0x00, 0x84, 0x89, 0xaa},
20900c0d06caSMauro Carvalho Chehab 	{0x00, 0x85, 0x96, 0xaa},
20910c0d06caSMauro Carvalho Chehab 	{0x00, 0x86, 0xa1, 0xaa},
20920c0d06caSMauro Carvalho Chehab 	{0x00, 0x87, 0xb7, 0xaa},
20930c0d06caSMauro Carvalho Chehab 	{0x00, 0x88, 0xcc, 0xaa},
20940c0d06caSMauro Carvalho Chehab 	{0x00, 0x89, 0xe1, 0xaa},
20950c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0xe0, 0xaa},
20960c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x00, 0xaa},
20970c0d06caSMauro Carvalho Chehab 	{0x00, 0x10, 0x00, 0xaa},
20980c0d06caSMauro Carvalho Chehab 	{0x00, 0x0d, 0x40, 0xaa},
20990c0d06caSMauro Carvalho Chehab 	{0x00, 0x14, 0x28, 0xaa},
21000c0d06caSMauro Carvalho Chehab 	{0x00, 0xa5, 0x05, 0xaa},
21010c0d06caSMauro Carvalho Chehab 	{0x00, 0xab, 0x07, 0xaa},
21020c0d06caSMauro Carvalho Chehab 	{0x00, 0x24, 0x95, 0xaa},
21030c0d06caSMauro Carvalho Chehab 	{0x00, 0x25, 0x33, 0xaa},
21040c0d06caSMauro Carvalho Chehab 	{0x00, 0x26, 0xe3, 0xaa},
21050c0d06caSMauro Carvalho Chehab 	{0x00, 0x9f, 0x88, 0xaa},
21060c0d06caSMauro Carvalho Chehab 	{0x00, 0xa0, 0x78, 0xaa},
21070c0d06caSMauro Carvalho Chehab 	{0x00, 0x55, 0x90, 0xaa},
21080c0d06caSMauro Carvalho Chehab 	{0x00, 0xa1, 0x03, 0xaa},
21090c0d06caSMauro Carvalho Chehab 	{0x00, 0xa6, 0xe0, 0xaa},
21100c0d06caSMauro Carvalho Chehab 	{0x00, 0xa7, 0xd8, 0xaa},
21110c0d06caSMauro Carvalho Chehab 	{0x00, 0xa8, 0xf0, 0xaa},
21120c0d06caSMauro Carvalho Chehab 	{0x00, 0xa9, 0x90, 0xaa},
21130c0d06caSMauro Carvalho Chehab 	{0x00, 0xaa, 0x14, 0xaa},
21140c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0xe5, 0xaa},
21150c0d06caSMauro Carvalho Chehab 	{0x00, 0x0e, 0x61, 0xaa},
21160c0d06caSMauro Carvalho Chehab 	{0x00, 0x0f, 0x4b, 0xaa},
21170c0d06caSMauro Carvalho Chehab 	{0x00, 0x16, 0x02, 0xaa},
21180c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0x07, 0xaa},	/* MVFP */
21190c0d06caSMauro Carvalho Chehab 	{0x00, 0x21, 0x02, 0xaa},
21200c0d06caSMauro Carvalho Chehab 	{0x00, 0x22, 0x91, 0xaa},
21210c0d06caSMauro Carvalho Chehab 	{0x00, 0x29, 0x07, 0xaa},
21220c0d06caSMauro Carvalho Chehab 	{0x00, 0x33, 0x0b, 0xaa},
21230c0d06caSMauro Carvalho Chehab 	{0x00, 0x35, 0x0b, 0xaa},
21240c0d06caSMauro Carvalho Chehab 	{0x00, 0x37, 0x1d, 0xaa},
21250c0d06caSMauro Carvalho Chehab 	{0x00, 0x38, 0x71, 0xaa},
21260c0d06caSMauro Carvalho Chehab 	{0x00, 0x39, 0x2a, 0xaa},
21270c0d06caSMauro Carvalho Chehab 	{0x00, 0x3c, 0x78, 0xaa},
21280c0d06caSMauro Carvalho Chehab 	{0x00, 0x4d, 0x40, 0xaa},
21290c0d06caSMauro Carvalho Chehab 	{0x00, 0x4e, 0x20, 0xaa},
21300c0d06caSMauro Carvalho Chehab 	{0x00, 0x74, 0x19, 0xaa},
21310c0d06caSMauro Carvalho Chehab 	{0x00, 0x8d, 0x4f, 0xaa},
21320c0d06caSMauro Carvalho Chehab 	{0x00, 0x8e, 0x00, 0xaa},
21330c0d06caSMauro Carvalho Chehab 	{0x00, 0x8f, 0x00, 0xaa},
21340c0d06caSMauro Carvalho Chehab 	{0x00, 0x90, 0x00, 0xaa},
21350c0d06caSMauro Carvalho Chehab 	{0x00, 0x91, 0x00, 0xaa},
21360c0d06caSMauro Carvalho Chehab 	{0x00, 0x96, 0x00, 0xaa},
21370c0d06caSMauro Carvalho Chehab 	{0x00, 0x9a, 0x80, 0xaa},
21380c0d06caSMauro Carvalho Chehab 	{0x00, 0xb0, 0x84, 0xaa},
21390c0d06caSMauro Carvalho Chehab 	{0x00, 0xb1, 0x0c, 0xaa},
21400c0d06caSMauro Carvalho Chehab 	{0x00, 0xb2, 0x0e, 0xaa},
21410c0d06caSMauro Carvalho Chehab 	{0x00, 0xb3, 0x82, 0xaa},
21420c0d06caSMauro Carvalho Chehab 	{0x00, 0xb8, 0x0a, 0xaa},
21430c0d06caSMauro Carvalho Chehab 	{0x00, 0x43, 0x14, 0xaa},
21440c0d06caSMauro Carvalho Chehab 	{0x00, 0x44, 0xf0, 0xaa},
21450c0d06caSMauro Carvalho Chehab 	{0x00, 0x45, 0x45, 0xaa},
21460c0d06caSMauro Carvalho Chehab 	{0x00, 0x46, 0x63, 0xaa},
21470c0d06caSMauro Carvalho Chehab 	{0x00, 0x47, 0x2d, 0xaa},
21480c0d06caSMauro Carvalho Chehab 	{0x00, 0x48, 0x46, 0xaa},
21490c0d06caSMauro Carvalho Chehab 	{0x00, 0x59, 0x88, 0xaa},
21500c0d06caSMauro Carvalho Chehab 	{0x00, 0x5a, 0xa0, 0xaa},
21510c0d06caSMauro Carvalho Chehab 	{0x00, 0x5b, 0xc6, 0xaa},
21520c0d06caSMauro Carvalho Chehab 	{0x00, 0x5c, 0x7d, 0xaa},
21530c0d06caSMauro Carvalho Chehab 	{0x00, 0x5d, 0x5f, 0xaa},
21540c0d06caSMauro Carvalho Chehab 	{0x00, 0x5e, 0x19, 0xaa},
21550c0d06caSMauro Carvalho Chehab 	{0x00, 0x6c, 0x0a, 0xaa},
21560c0d06caSMauro Carvalho Chehab 	{0x00, 0x6d, 0x55, 0xaa},
21570c0d06caSMauro Carvalho Chehab 	{0x00, 0x6e, 0x11, 0xaa},
21580c0d06caSMauro Carvalho Chehab 	{0x00, 0x6f, 0x9e, 0xaa},
21590c0d06caSMauro Carvalho Chehab 	{0x00, 0x69, 0x00, 0xaa},
21600c0d06caSMauro Carvalho Chehab 	{0x00, 0x6a, 0x40, 0xaa},
21610c0d06caSMauro Carvalho Chehab 	{0x00, 0x01, 0x40, 0xaa},
21620c0d06caSMauro Carvalho Chehab 	{0x00, 0x02, 0x40, 0xaa},
21630c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0xe7, 0xaa},
21640c0d06caSMauro Carvalho Chehab 	{0x00, 0x5f, 0xf0, 0xaa},
21650c0d06caSMauro Carvalho Chehab 	{0x00, 0x60, 0xf0, 0xaa},
21660c0d06caSMauro Carvalho Chehab 	{0x00, 0x61, 0xf0, 0xaa},
21670c0d06caSMauro Carvalho Chehab 	{0x00, 0x27, 0xa0, 0xaa},
21680c0d06caSMauro Carvalho Chehab 	{0x00, 0x28, 0x80, 0xaa},
21690c0d06caSMauro Carvalho Chehab 	{0x00, 0x2c, 0x90, 0xaa},
21700c0d06caSMauro Carvalho Chehab 	{0x00, 0x4f, 0x66, 0xaa},
21710c0d06caSMauro Carvalho Chehab 	{0x00, 0x50, 0x66, 0xaa},
21720c0d06caSMauro Carvalho Chehab 	{0x00, 0x51, 0x00, 0xaa},
21730c0d06caSMauro Carvalho Chehab 	{0x00, 0x52, 0x22, 0xaa},
21740c0d06caSMauro Carvalho Chehab 	{0x00, 0x53, 0x5e, 0xaa},
21750c0d06caSMauro Carvalho Chehab 	{0x00, 0x54, 0x80, 0xaa},
21760c0d06caSMauro Carvalho Chehab 	{0x00, 0x58, 0x9e, 0xaa},
21770c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0x08, 0xaa},
21780c0d06caSMauro Carvalho Chehab 	{0x00, 0x3f, 0x00, 0xaa},
21790c0d06caSMauro Carvalho Chehab 	{0x00, 0x75, 0x85, 0xaa},
21800c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0xe1, 0xaa},
21810c0d06caSMauro Carvalho Chehab 	{0x00, 0x4c, 0x00, 0xaa},
21820c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x0a, 0xaa},
21830c0d06caSMauro Carvalho Chehab 	{0x00, 0x3d, 0x88, 0xaa},
21840c0d06caSMauro Carvalho Chehab 	{0x00, 0x4b, 0x09, 0xaa},
21850c0d06caSMauro Carvalho Chehab 	{0x00, 0xc9, 0x60, 0xaa},
21860c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0x38, 0xaa},
21870c0d06caSMauro Carvalho Chehab 	{0x00, 0x62, 0x30, 0xaa},
21880c0d06caSMauro Carvalho Chehab 	{0x00, 0x63, 0x30, 0xaa},
21890c0d06caSMauro Carvalho Chehab 	{0x00, 0x64, 0x08, 0xaa},
21900c0d06caSMauro Carvalho Chehab 	{0x00, 0x94, 0x07, 0xaa},
21910c0d06caSMauro Carvalho Chehab 	{0x00, 0x95, 0x0b, 0xaa},
21920c0d06caSMauro Carvalho Chehab 	{0x00, 0x65, 0x00, 0xaa},
21930c0d06caSMauro Carvalho Chehab 	{0x00, 0x66, 0x05, 0xaa},
21940c0d06caSMauro Carvalho Chehab 	{0x00, 0x56, 0x50, 0xaa},
21950c0d06caSMauro Carvalho Chehab 	{0x00, 0x34, 0x11, 0xaa},
21960c0d06caSMauro Carvalho Chehab 	{0x00, 0xa4, 0x88, 0xaa},
21970c0d06caSMauro Carvalho Chehab 	{0x00, 0x96, 0x00, 0xaa},
21980c0d06caSMauro Carvalho Chehab 	{0x00, 0x97, 0x30, 0xaa},
21990c0d06caSMauro Carvalho Chehab 	{0x00, 0x98, 0x20, 0xaa},
22000c0d06caSMauro Carvalho Chehab 	{0x00, 0x99, 0x30, 0xaa},
22010c0d06caSMauro Carvalho Chehab 	{0x00, 0x9a, 0x84, 0xaa},
22020c0d06caSMauro Carvalho Chehab 	{0x00, 0x9b, 0x29, 0xaa},
22030c0d06caSMauro Carvalho Chehab 	{0x00, 0x9c, 0x03, 0xaa},
22040c0d06caSMauro Carvalho Chehab 	{0x00, 0x78, 0x04, 0xaa},
22050c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x01, 0xaa},
22060c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0xf0, 0xaa},
22070c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x0f, 0xaa},
22080c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x00, 0xaa},
22090c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x10, 0xaa},
22100c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x7e, 0xaa},
22110c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x0a, 0xaa},
22120c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x80, 0xaa},
22130c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x0b, 0xaa},
22140c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x01, 0xaa},
22150c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x0c, 0xaa},
22160c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x0f, 0xaa},
22170c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x0d, 0xaa},
22180c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x20, 0xaa},
22190c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x09, 0xaa},
22200c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x80, 0xaa},
22210c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x02, 0xaa},
22220c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0xc0, 0xaa},
22230c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x03, 0xaa},
22240c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x40, 0xaa},
22250c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x05, 0xaa},
22260c0d06caSMauro Carvalho Chehab 	{0x00, 0xc8, 0x30, 0xaa},
22270c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x26, 0xaa},
22280c0d06caSMauro Carvalho Chehab 	{0x00, 0x11, 0x40, 0xaa},
22290c0d06caSMauro Carvalho Chehab 	{0x00, 0x3a, 0x04, 0xaa},
22300c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x00, 0xaa},
22310c0d06caSMauro Carvalho Chehab 	{0x00, 0x40, 0xc0, 0xaa},
22320c0d06caSMauro Carvalho Chehab 	{0x00, 0x8c, 0x00, 0xaa},
22330c0d06caSMauro Carvalho Chehab 	{0x00, 0x17, 0x14, 0xaa},
22340c0d06caSMauro Carvalho Chehab 	{0x00, 0x18, 0x02, 0xaa},
22350c0d06caSMauro Carvalho Chehab 	{0x00, 0x32, 0x92, 0xaa},
22360c0d06caSMauro Carvalho Chehab 	{0x00, 0x19, 0x02, 0xaa},
22370c0d06caSMauro Carvalho Chehab 	{0x00, 0x1a, 0x7a, 0xaa},
22380c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x0a, 0xaa},
22390c0d06caSMauro Carvalho Chehab 	{0x00, 0x0c, 0x00, 0xaa},
22400c0d06caSMauro Carvalho Chehab 	{0x00, 0x3e, 0x00, 0xaa},
22410c0d06caSMauro Carvalho Chehab 	{0x00, 0x70, 0x3a, 0xaa},
22420c0d06caSMauro Carvalho Chehab 	{0x00, 0x71, 0x35, 0xaa},
22430c0d06caSMauro Carvalho Chehab 	{0x00, 0x72, 0x11, 0xaa},
22440c0d06caSMauro Carvalho Chehab 	{0x00, 0x73, 0xf0, 0xaa},
22450c0d06caSMauro Carvalho Chehab 	{0x00, 0xa2, 0x02, 0xaa},
22460c0d06caSMauro Carvalho Chehab 	{0x00, 0xb1, 0x00, 0xaa},
22470c0d06caSMauro Carvalho Chehab 	{0x00, 0xb1, 0x0c, 0xaa},
22480c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0x37, 0xaa},	/* MVFP */
22490c0d06caSMauro Carvalho Chehab 	{0x00, 0xaa, 0x14, 0xaa},
22500c0d06caSMauro Carvalho Chehab 	{0x00, 0x24, 0x80, 0xaa},
22510c0d06caSMauro Carvalho Chehab 	{0x00, 0x25, 0x74, 0xaa},
22520c0d06caSMauro Carvalho Chehab 	{0x00, 0x26, 0xd3, 0xaa},
22530c0d06caSMauro Carvalho Chehab 	{0x00, 0x0d, 0x00, 0xaa},
22540c0d06caSMauro Carvalho Chehab 	{0x00, 0x14, 0x18, 0xaa},
22550c0d06caSMauro Carvalho Chehab 	{0x00, 0x9d, 0x99, 0xaa},
22560c0d06caSMauro Carvalho Chehab 	{0x00, 0x9e, 0x7f, 0xaa},
22570c0d06caSMauro Carvalho Chehab 	{0x00, 0x64, 0x08, 0xaa},
22580c0d06caSMauro Carvalho Chehab 	{0x00, 0x94, 0x07, 0xaa},
22590c0d06caSMauro Carvalho Chehab 	{0x00, 0x95, 0x06, 0xaa},
22600c0d06caSMauro Carvalho Chehab 	{0x00, 0x66, 0x05, 0xaa},
22610c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0x08, 0xaa},
22620c0d06caSMauro Carvalho Chehab 	{0x00, 0x3f, 0x00, 0xaa},
22630c0d06caSMauro Carvalho Chehab 	{0x00, 0x75, 0x07, 0xaa},
22640c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0xe1, 0xaa},
22650c0d06caSMauro Carvalho Chehab 	{0x00, 0x4c, 0x00, 0xaa},
22660c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x00, 0xaa},
22670c0d06caSMauro Carvalho Chehab 	{0x00, 0x3d, 0xc2, 0xaa},
22680c0d06caSMauro Carvalho Chehab 	{0x00, 0x4b, 0x09, 0xaa},
22690c0d06caSMauro Carvalho Chehab 	{0x00, 0xc9, 0x60, 0xaa},
22700c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0x38, 0xaa},
22710c0d06caSMauro Carvalho Chehab 	{0xbc, 0x02, 0x18, 0xcc},
22720c0d06caSMauro Carvalho Chehab 	{0xbc, 0x03, 0x50, 0xcc},
22730c0d06caSMauro Carvalho Chehab 	{0xbc, 0x04, 0x18, 0xcc},
22740c0d06caSMauro Carvalho Chehab 	{0xbc, 0x05, 0x00, 0xcc},
22750c0d06caSMauro Carvalho Chehab 	{0xbc, 0x06, 0x00, 0xcc},
22760c0d06caSMauro Carvalho Chehab 	{0xbc, 0x08, 0x30, 0xcc},
22770c0d06caSMauro Carvalho Chehab 	{0xbc, 0x09, 0x40, 0xcc},
22780c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0a, 0x10, 0xcc},
22790c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0b, 0x00, 0xcc},
22800c0d06caSMauro Carvalho Chehab 	{0xbc, 0x0c, 0x00, 0xcc},
22810c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x26, 0xcc},
22820c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x02, 0xcc},
22830c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x04, 0xcc},
22840c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
22850c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x45, 0xcc},
22860c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x05, 0xaa},
22870c0d06caSMauro Carvalho Chehab 	{},
22880c0d06caSMauro Carvalho Chehab };
22890c0d06caSMauro Carvalho Chehab 
22900c0d06caSMauro Carvalho Chehab /* PO1200 - values from usbvm326.inf and ms-win trace */
22910c0d06caSMauro Carvalho Chehab static const u8 po1200_gamma[17] = {
22920c0d06caSMauro Carvalho Chehab 	0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
22930c0d06caSMauro Carvalho Chehab 	0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff
22940c0d06caSMauro Carvalho Chehab };
22950c0d06caSMauro Carvalho Chehab static const u8 po1200_matrix[9] = {
22960c0d06caSMauro Carvalho Chehab 	0x60, 0xf9, 0xe5, 0xe7, 0x50, 0x05, 0xf3, 0xe6, 0x5e
22970c0d06caSMauro Carvalho Chehab };
22980c0d06caSMauro Carvalho Chehab static const u8 po1200_initVGA_data[][4] = {
22990c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},	/* reset? */
23000c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x19, 0xcc},
23010c0d06caSMauro Carvalho Chehab /*	{0x00, 0x00, 0x33, 0xdd}, */
23020c0d06caSMauro Carvalho Chehab 	{0xb0, 0x04, 0x02, 0xcc},
23030c0d06caSMauro Carvalho Chehab 	{0xb0, 0x02, 0x02, 0xcc},
23040c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5d, 0x00, 0xcc},
23050c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x01, 0xcc},
23060c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x64, 0xcc},
23070c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x65, 0xcc},
23080c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x01, 0xcc},
23090c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},
23100c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
23110c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
23120c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
23130c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
23140c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0xb2, 0xcc},
23150c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x18, 0xcc},
23160c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x15, 0xcc},
23170c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
23180c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
23190c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x02, 0xcc},
23200c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0x58, 0xcc},
23210c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
23220c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
23230c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x03, 0xcc},
23240c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x1f, 0xcc},
23250c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0x71, 0xcc},
23260c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},
23270c0d06caSMauro Carvalho Chehab 	{0xb0, 0x54, 0x13, 0xcc},
23280c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
23290c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x01, 0xcc},
23300c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xdc, 0xcc},	/* i2c add: 5c */
23310c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
23320c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x05, 0xaa},
23330c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0x02, 0xaa},
23340c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0xc6, 0xaa},	/* h/v flip */
23350c0d06caSMauro Carvalho Chehab 	{0x00, 0x21, 0x00, 0xaa},
23360c0d06caSMauro Carvalho Chehab 	{0x00, 0x25, 0x02, 0xaa},
23370c0d06caSMauro Carvalho Chehab 	{0x00, 0x3c, 0x4f, 0xaa},
23380c0d06caSMauro Carvalho Chehab 	{0x00, 0x3f, 0xe0, 0xaa},
23390c0d06caSMauro Carvalho Chehab 	{0x00, 0x42, 0xff, 0xaa},
23400c0d06caSMauro Carvalho Chehab 	{0x00, 0x45, 0x34, 0xaa},
23410c0d06caSMauro Carvalho Chehab 	{0x00, 0x55, 0xfe, 0xaa},
23420c0d06caSMauro Carvalho Chehab 	{0x00, 0x59, 0xd3, 0xaa},
23430c0d06caSMauro Carvalho Chehab 	{0x00, 0x5e, 0x04, 0xaa},
23440c0d06caSMauro Carvalho Chehab 	{0x00, 0x61, 0xb8, 0xaa},	/* sharpness */
23450c0d06caSMauro Carvalho Chehab 	{0x00, 0x62, 0x02, 0xaa},
23460c0d06caSMauro Carvalho Chehab 	{0x00, 0xa7, 0x31, 0xaa},
23470c0d06caSMauro Carvalho Chehab 	{0x00, 0xa9, 0x66, 0xaa},
23480c0d06caSMauro Carvalho Chehab 	{0x00, 0xb0, 0x00, 0xaa},
23490c0d06caSMauro Carvalho Chehab 	{0x00, 0xb1, 0x00, 0xaa},
23500c0d06caSMauro Carvalho Chehab 	{0x00, 0xb3, 0x11, 0xaa},
23510c0d06caSMauro Carvalho Chehab 	{0x00, 0xb6, 0x26, 0xaa},
23520c0d06caSMauro Carvalho Chehab 	{0x00, 0xb7, 0x20, 0xaa},
23530c0d06caSMauro Carvalho Chehab 	{0x00, 0xba, 0x04, 0xaa},
23540c0d06caSMauro Carvalho Chehab 	{0x00, 0x88, 0x42, 0xaa},
23550c0d06caSMauro Carvalho Chehab 	{0x00, 0x89, 0x9a, 0xaa},
23560c0d06caSMauro Carvalho Chehab 	{0x00, 0x8a, 0x88, 0xaa},
23570c0d06caSMauro Carvalho Chehab 	{0x00, 0x8b, 0x8e, 0xaa},
23580c0d06caSMauro Carvalho Chehab 	{0x00, 0x8c, 0x3e, 0xaa},
23590c0d06caSMauro Carvalho Chehab 	{0x00, 0x8d, 0x90, 0xaa},
23600c0d06caSMauro Carvalho Chehab 	{0x00, 0x8e, 0x87, 0xaa},
23610c0d06caSMauro Carvalho Chehab 	{0x00, 0x8f, 0x96, 0xaa},
23620c0d06caSMauro Carvalho Chehab 	{0x00, 0x90, 0x3d, 0xaa},
23630c0d06caSMauro Carvalho Chehab 	{0x00, 0x64, 0x00, 0xaa},
23640c0d06caSMauro Carvalho Chehab 	{0x00, 0x65, 0x10, 0xaa},
23650c0d06caSMauro Carvalho Chehab 	{0x00, 0x66, 0x20, 0xaa},
23660c0d06caSMauro Carvalho Chehab 	{0x00, 0x67, 0x2b, 0xaa},
23670c0d06caSMauro Carvalho Chehab 	{0x00, 0x68, 0x36, 0xaa},
23680c0d06caSMauro Carvalho Chehab 	{0x00, 0x69, 0x49, 0xaa},
23690c0d06caSMauro Carvalho Chehab 	{0x00, 0x6a, 0x5a, 0xaa},
23700c0d06caSMauro Carvalho Chehab 	{0x00, 0x6b, 0x7f, 0xaa},
23710c0d06caSMauro Carvalho Chehab 	{0x00, 0x6c, 0x9b, 0xaa},
23720c0d06caSMauro Carvalho Chehab 	{0x00, 0x6d, 0xba, 0xaa},
23730c0d06caSMauro Carvalho Chehab 	{0x00, 0x6e, 0xd4, 0xaa},
23740c0d06caSMauro Carvalho Chehab 	{0x00, 0x6f, 0xea, 0xaa},
23750c0d06caSMauro Carvalho Chehab 	{0x00, 0x70, 0x00, 0xaa},
23760c0d06caSMauro Carvalho Chehab 	{0x00, 0x71, 0x10, 0xaa},
23770c0d06caSMauro Carvalho Chehab 	{0x00, 0x72, 0x20, 0xaa},
23780c0d06caSMauro Carvalho Chehab 	{0x00, 0x73, 0x2b, 0xaa},
23790c0d06caSMauro Carvalho Chehab 	{0x00, 0x74, 0x36, 0xaa},
23800c0d06caSMauro Carvalho Chehab 	{0x00, 0x75, 0x49, 0xaa},
23810c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0x5a, 0xaa},
23820c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x7f, 0xaa},
23830c0d06caSMauro Carvalho Chehab 	{0x00, 0x78, 0x9b, 0xaa},
23840c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0xba, 0xaa},
23850c0d06caSMauro Carvalho Chehab 	{0x00, 0x7a, 0xd4, 0xaa},
23860c0d06caSMauro Carvalho Chehab 	{0x00, 0x7b, 0xea, 0xaa},
23870c0d06caSMauro Carvalho Chehab 	{0x00, 0x7c, 0x00, 0xaa},
23880c0d06caSMauro Carvalho Chehab 	{0x00, 0x7d, 0x10, 0xaa},
23890c0d06caSMauro Carvalho Chehab 	{0x00, 0x7e, 0x20, 0xaa},
23900c0d06caSMauro Carvalho Chehab 	{0x00, 0x7f, 0x2b, 0xaa},
23910c0d06caSMauro Carvalho Chehab 	{0x00, 0x80, 0x36, 0xaa},
23920c0d06caSMauro Carvalho Chehab 	{0x00, 0x81, 0x49, 0xaa},
23930c0d06caSMauro Carvalho Chehab 	{0x00, 0x82, 0x5a, 0xaa},
23940c0d06caSMauro Carvalho Chehab 	{0x00, 0x83, 0x7f, 0xaa},
23950c0d06caSMauro Carvalho Chehab 	{0x00, 0x84, 0x9b, 0xaa},
23960c0d06caSMauro Carvalho Chehab 	{0x00, 0x85, 0xba, 0xaa},
23970c0d06caSMauro Carvalho Chehab 	{0x00, 0x86, 0xd4, 0xaa},
23980c0d06caSMauro Carvalho Chehab 	{0x00, 0x87, 0xea, 0xaa},
23990c0d06caSMauro Carvalho Chehab 	{0x00, 0x57, 0x2a, 0xaa},
24000c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x01, 0xaa},
24010c0d06caSMauro Carvalho Chehab 	{0x00, 0x04, 0x10, 0xaa},
24020c0d06caSMauro Carvalho Chehab 	{0x00, 0x05, 0x10, 0xaa},
24030c0d06caSMauro Carvalho Chehab 	{0x00, 0x06, 0x10, 0xaa},
24040c0d06caSMauro Carvalho Chehab 	{0x00, 0x07, 0x10, 0xaa},
24050c0d06caSMauro Carvalho Chehab 	{0x00, 0x08, 0x13, 0xaa},
24060c0d06caSMauro Carvalho Chehab 	{0x00, 0x0a, 0x00, 0xaa},
24070c0d06caSMauro Carvalho Chehab 	{0x00, 0x0b, 0x10, 0xaa},
24080c0d06caSMauro Carvalho Chehab 	{0x00, 0x0c, 0x20, 0xaa},
24090c0d06caSMauro Carvalho Chehab 	{0x00, 0x0d, 0x18, 0xaa},
24100c0d06caSMauro Carvalho Chehab 	{0x00, 0x22, 0x01, 0xaa},
24110c0d06caSMauro Carvalho Chehab 	{0x00, 0x23, 0x60, 0xaa},
24120c0d06caSMauro Carvalho Chehab 	{0x00, 0x25, 0x08, 0xaa},
24130c0d06caSMauro Carvalho Chehab 	{0x00, 0x26, 0x82, 0xaa},
24140c0d06caSMauro Carvalho Chehab 	{0x00, 0x2e, 0x0f, 0xaa},
24150c0d06caSMauro Carvalho Chehab 	{0x00, 0x2f, 0x1e, 0xaa},
24160c0d06caSMauro Carvalho Chehab 	{0x00, 0x30, 0x2d, 0xaa},
24170c0d06caSMauro Carvalho Chehab 	{0x00, 0x31, 0x3c, 0xaa},
24180c0d06caSMauro Carvalho Chehab 	{0x00, 0x32, 0x4b, 0xaa},
24190c0d06caSMauro Carvalho Chehab 	{0x00, 0x33, 0x5a, 0xaa},
24200c0d06caSMauro Carvalho Chehab 	{0x00, 0x34, 0x69, 0xaa},
24210c0d06caSMauro Carvalho Chehab 	{0x00, 0x35, 0x78, 0xaa},
24220c0d06caSMauro Carvalho Chehab 	{0x00, 0x36, 0x87, 0xaa},
24230c0d06caSMauro Carvalho Chehab 	{0x00, 0x37, 0x96, 0xaa},
24240c0d06caSMauro Carvalho Chehab 	{0x00, 0x38, 0xa5, 0xaa},
24250c0d06caSMauro Carvalho Chehab 	{0x00, 0x39, 0xb4, 0xaa},
24260c0d06caSMauro Carvalho Chehab 	{0x00, 0x3a, 0xc3, 0xaa},
24270c0d06caSMauro Carvalho Chehab 	{0x00, 0x3b, 0xd2, 0xaa},
24280c0d06caSMauro Carvalho Chehab 	{0x00, 0x3c, 0xe1, 0xaa},
24290c0d06caSMauro Carvalho Chehab 	{0x00, 0x3e, 0xff, 0xaa},
24300c0d06caSMauro Carvalho Chehab 	{0x00, 0x3f, 0xff, 0xaa},
24310c0d06caSMauro Carvalho Chehab 	{0x00, 0x40, 0xff, 0xaa},
24320c0d06caSMauro Carvalho Chehab 	{0x00, 0x41, 0xff, 0xaa},
24330c0d06caSMauro Carvalho Chehab 	{0x00, 0x42, 0xff, 0xaa},
24340c0d06caSMauro Carvalho Chehab 	{0x00, 0x43, 0xff, 0xaa},
24350c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
24360c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
24370c0d06caSMauro Carvalho Chehab 	{0x00, 0x20, 0xc4, 0xaa},
24380c0d06caSMauro Carvalho Chehab 	{0x00, 0x13, 0x03, 0xaa},
24390c0d06caSMauro Carvalho Chehab 	{0x00, 0x3c, 0x50, 0xaa},
24400c0d06caSMauro Carvalho Chehab 	{0x00, 0x61, 0x6a, 0xaa},	/* sharpness? */
24410c0d06caSMauro Carvalho Chehab 	{0x00, 0x51, 0x5b, 0xaa},
24420c0d06caSMauro Carvalho Chehab 	{0x00, 0x52, 0x91, 0xaa},
24430c0d06caSMauro Carvalho Chehab 	{0x00, 0x53, 0x4c, 0xaa},
24440c0d06caSMauro Carvalho Chehab 	{0x00, 0x54, 0x50, 0xaa},
24450c0d06caSMauro Carvalho Chehab 	{0x00, 0x56, 0x02, 0xaa},
24460c0d06caSMauro Carvalho Chehab 	{0xb6, 0x00, 0x00, 0xcc},
24470c0d06caSMauro Carvalho Chehab 	{0xb6, 0x03, 0x03, 0xcc},
24480c0d06caSMauro Carvalho Chehab 	{0xb6, 0x02, 0x20, 0xcc},
24490c0d06caSMauro Carvalho Chehab 	{0xb6, 0x05, 0x02, 0xcc},
24500c0d06caSMauro Carvalho Chehab 	{0xb6, 0x04, 0x58, 0xcc},
24510c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0xf8, 0xcc},
24520c0d06caSMauro Carvalho Chehab 	{0xb6, 0x13, 0x21, 0xcc},
24530c0d06caSMauro Carvalho Chehab 	{0xb6, 0x18, 0x03, 0xcc},
24540c0d06caSMauro Carvalho Chehab 	{0xb6, 0x17, 0xa9, 0xcc},
24550c0d06caSMauro Carvalho Chehab 	{0xb6, 0x16, 0x80, 0xcc},
24560c0d06caSMauro Carvalho Chehab 	{0xb6, 0x22, 0x12, 0xcc},
24570c0d06caSMauro Carvalho Chehab 	{0xb6, 0x23, 0x0b, 0xcc},
24580c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc0, 0x39, 0xcc},
24590c0d06caSMauro Carvalho Chehab 	{0xbf, 0xc1, 0x04, 0xcc},
24600c0d06caSMauro Carvalho Chehab 	{0xbf, 0xcc, 0x00, 0xcc},
24610c0d06caSMauro Carvalho Chehab 	{0xb8, 0x06, 0x20, 0xcc},
24620c0d06caSMauro Carvalho Chehab 	{0xb8, 0x07, 0x03, 0xcc},
24630c0d06caSMauro Carvalho Chehab 	{0xb8, 0x08, 0x58, 0xcc},
24640c0d06caSMauro Carvalho Chehab 	{0xb8, 0x09, 0x02, 0xcc},
24650c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
24660c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
24670c0d06caSMauro Carvalho Chehab 	{0x00, 0xd9, 0x0f, 0xaa},
24680c0d06caSMauro Carvalho Chehab 	{0x00, 0xda, 0xaa, 0xaa},
24690c0d06caSMauro Carvalho Chehab 	{0x00, 0xd9, 0x10, 0xaa},
24700c0d06caSMauro Carvalho Chehab 	{0x00, 0xda, 0xaa, 0xaa},
24710c0d06caSMauro Carvalho Chehab 	{0x00, 0xd9, 0x11, 0xaa},
24720c0d06caSMauro Carvalho Chehab 	{0x00, 0xda, 0x00, 0xaa},
24730c0d06caSMauro Carvalho Chehab 	{0x00, 0xd9, 0x12, 0xaa},
24740c0d06caSMauro Carvalho Chehab 	{0x00, 0xda, 0xff, 0xaa},
24750c0d06caSMauro Carvalho Chehab 	{0x00, 0xd9, 0x13, 0xaa},
24760c0d06caSMauro Carvalho Chehab 	{0x00, 0xda, 0xff, 0xaa},
24770c0d06caSMauro Carvalho Chehab 	{0x00, 0xe8, 0x11, 0xaa},
24780c0d06caSMauro Carvalho Chehab 	{0x00, 0xe9, 0x12, 0xaa},
24790c0d06caSMauro Carvalho Chehab 	{0x00, 0xea, 0x5c, 0xaa},
24800c0d06caSMauro Carvalho Chehab 	{0x00, 0xeb, 0xff, 0xaa},
24810c0d06caSMauro Carvalho Chehab 	{0x00, 0xd8, 0x80, 0xaa},
24820c0d06caSMauro Carvalho Chehab 	{0x00, 0xe6, 0x02, 0xaa},
24830c0d06caSMauro Carvalho Chehab 	{0x00, 0xd6, 0x40, 0xaa},
24840c0d06caSMauro Carvalho Chehab 	{0x00, 0xe3, 0x05, 0xaa},
24850c0d06caSMauro Carvalho Chehab 	{0x00, 0xe0, 0x40, 0xaa},
24860c0d06caSMauro Carvalho Chehab 	{0x00, 0xde, 0x03, 0xaa},
24870c0d06caSMauro Carvalho Chehab 	{0x00, 0xdf, 0x03, 0xaa},
24880c0d06caSMauro Carvalho Chehab 	{0x00, 0xdb, 0x02, 0xaa},
24890c0d06caSMauro Carvalho Chehab 	{0x00, 0xdc, 0x00, 0xaa},
24900c0d06caSMauro Carvalho Chehab 	{0x00, 0xdd, 0x03, 0xaa},
24910c0d06caSMauro Carvalho Chehab 	{0x00, 0xe1, 0x08, 0xaa},
24920c0d06caSMauro Carvalho Chehab 	{0x00, 0xe2, 0x01, 0xaa},
24930c0d06caSMauro Carvalho Chehab 	{0x00, 0xd6, 0x40, 0xaa},
24940c0d06caSMauro Carvalho Chehab 	{0x00, 0xe4, 0x40, 0xaa},
24950c0d06caSMauro Carvalho Chehab 	{0x00, 0xa8, 0x8f, 0xaa},
24960c0d06caSMauro Carvalho Chehab 	{0x00, 0xb4, 0x16, 0xaa},
24970c0d06caSMauro Carvalho Chehab 	{0xb0, 0x02, 0x06, 0xcc},
24980c0d06caSMauro Carvalho Chehab 	{0xb0, 0x18, 0x06, 0xcc},
24990c0d06caSMauro Carvalho Chehab 	{0xb0, 0x19, 0x06, 0xcc},
25000c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5d, 0x18, 0xcc},
25010c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x00, 0xcc},
25020c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x00, 0xcc},
25030c0d06caSMauro Carvalho Chehab 	{0x00, 0xb4, 0x0e, 0xaa},
25040c0d06caSMauro Carvalho Chehab 	{0x00, 0xb5, 0x49, 0xaa},
25050c0d06caSMauro Carvalho Chehab 	{0x00, 0xb6, 0x1c, 0xaa},
25060c0d06caSMauro Carvalho Chehab 	{0x00, 0xb7, 0x96, 0xaa},
25070c0d06caSMauro Carvalho Chehab /* end of usbvm326.inf - start of ms-win trace */
25080c0d06caSMauro Carvalho Chehab 	{0xb6, 0x12, 0xf8, 0xcc},
25090c0d06caSMauro Carvalho Chehab 	{0xb6, 0x13, 0x3d, 0xcc},
25100c0d06caSMauro Carvalho Chehab /*read b306*/
25110c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
25120c0d06caSMauro Carvalho Chehab 	{0x00, 0x1a, 0x09, 0xaa},
25130c0d06caSMauro Carvalho Chehab 	{0x00, 0x1b, 0x8a, 0xaa},
25140c0d06caSMauro Carvalho Chehab /*read b827*/
25150c0d06caSMauro Carvalho Chehab 	{0xb8, 0x27, 0x00, 0xcc},
25160c0d06caSMauro Carvalho Chehab 	{0xb8, 0x26, 0x60, 0xcc},
25170c0d06caSMauro Carvalho Chehab 	{0xb8, 0x26, 0x60, 0xcc},
25180c0d06caSMauro Carvalho Chehab /*gamma - to do?*/
25190c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
25200c0d06caSMauro Carvalho Chehab 	{0x00, 0xae, 0x84, 0xaa},
25210c0d06caSMauro Carvalho Chehab /*gamma again*/
25220c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
25230c0d06caSMauro Carvalho Chehab 	{0x00, 0x96, 0xa0, 0xaa},
25240c0d06caSMauro Carvalho Chehab /*matrix*/
25250c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
25260c0d06caSMauro Carvalho Chehab 	{0x00, 0x91, 0x35, 0xaa},
25270c0d06caSMauro Carvalho Chehab 	{0x00, 0x92, 0x22, 0xaa},
25280c0d06caSMauro Carvalho Chehab /*gamma*/
25290c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
25300c0d06caSMauro Carvalho Chehab 	{0x00, 0x95, 0x85, 0xaa},
25310c0d06caSMauro Carvalho Chehab /*matrix*/
25320c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
25330c0d06caSMauro Carvalho Chehab 	{0x00, 0x4d, 0x20, 0xaa},
25340c0d06caSMauro Carvalho Chehab 	{0xb8, 0x22, 0x40, 0xcc},
25350c0d06caSMauro Carvalho Chehab 	{0xb8, 0x23, 0x40, 0xcc},
25360c0d06caSMauro Carvalho Chehab 	{0xb8, 0x24, 0x40, 0xcc},
25370c0d06caSMauro Carvalho Chehab 	{0xb8, 0x81, 0x09, 0xcc},
25380c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x64, 0xdd},
25390c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x01, 0xaa},
25400c0d06caSMauro Carvalho Chehab /*read 46*/
25410c0d06caSMauro Carvalho Chehab 	{0x00, 0x46, 0x3c, 0xaa},
25420c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
25430c0d06caSMauro Carvalho Chehab 	{0x00, 0x16, 0x40, 0xaa},
25440c0d06caSMauro Carvalho Chehab 	{0x00, 0x17, 0x40, 0xaa},
25450c0d06caSMauro Carvalho Chehab 	{0x00, 0x18, 0x40, 0xaa},
25460c0d06caSMauro Carvalho Chehab 	{0x00, 0x19, 0x41, 0xaa},
25470c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x01, 0xaa},
25480c0d06caSMauro Carvalho Chehab 	{0x00, 0x46, 0x3c, 0xaa},
25490c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x18, 0xdd},
25500c0d06caSMauro Carvalho Chehab /*read bfff*/
25510c0d06caSMauro Carvalho Chehab 	{0x00, 0x03, 0x00, 0xaa},
25520c0d06caSMauro Carvalho Chehab 	{0x00, 0xb4, 0x1c, 0xaa},
25530c0d06caSMauro Carvalho Chehab 	{0x00, 0xb5, 0x92, 0xaa},
25540c0d06caSMauro Carvalho Chehab 	{0x00, 0xb6, 0x39, 0xaa},
25550c0d06caSMauro Carvalho Chehab 	{0x00, 0xb7, 0x24, 0xaa},
25560c0d06caSMauro Carvalho Chehab /*write 89 0400 1415*/
25570c0d06caSMauro Carvalho Chehab 	{}
25580c0d06caSMauro Carvalho Chehab };
25590c0d06caSMauro Carvalho Chehab 
25600c0d06caSMauro Carvalho Chehab static const u8 poxxxx_init_common[][4] = {
25610c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x04, 0xcc},
25620c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
25630c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x64, 0xcc},
25640c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
25650c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x65, 0xcc},
25660c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x10, 0xdd},
25670c0d06caSMauro Carvalho Chehab 	{0xb3, 0x00, 0x67, 0xcc},
25680c0d06caSMauro Carvalho Chehab 	{0xb0, 0x03, 0x09, 0xcc},
25690c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x00, 0xcc},
25700c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x00, 0xcc},
25710c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
25720c0d06caSMauro Carvalho Chehab 	{0xb3, 0x08, 0x01, 0xcc},
25730c0d06caSMauro Carvalho Chehab 	{0xb3, 0x09, 0x0c, 0xcc},
25740c0d06caSMauro Carvalho Chehab 	{0xb3, 0x34, 0x01, 0xcc},
25750c0d06caSMauro Carvalho Chehab 	{0xb3, 0x35, 0xf6, 0xcc},	/* i2c add: 76 */
25760c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0xb0, 0xcc},
25770c0d06caSMauro Carvalho Chehab 	{0xb3, 0x03, 0x18, 0xcc},
25780c0d06caSMauro Carvalho Chehab 	{0xb3, 0x04, 0x15, 0xcc},
25790c0d06caSMauro Carvalho Chehab 	{0xb3, 0x20, 0x00, 0xcc},
25800c0d06caSMauro Carvalho Chehab 	{0xb3, 0x21, 0x00, 0xcc},
25810c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x04, 0xcc},	/* sensor height = 1024 */
25820c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0x00, 0xcc},
25830c0d06caSMauro Carvalho Chehab 	{0xb3, 0x14, 0x00, 0xcc},
25840c0d06caSMauro Carvalho Chehab 	{0xb3, 0x15, 0x00, 0xcc},
25850c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x04, 0xcc},	/* sensor width = 1280 */
25860c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0xff, 0xcc},
25870c0d06caSMauro Carvalho Chehab 	{0xb3, 0x2c, 0x03, 0xcc},
25880c0d06caSMauro Carvalho Chehab 	{0xb3, 0x2d, 0x56, 0xcc},
25890c0d06caSMauro Carvalho Chehab 	{0xb3, 0x2e, 0x02, 0xcc},
25900c0d06caSMauro Carvalho Chehab 	{0xb3, 0x2f, 0x0a, 0xcc},
25910c0d06caSMauro Carvalho Chehab 	{0xb3, 0x40, 0x00, 0xcc},
25920c0d06caSMauro Carvalho Chehab 	{0xb3, 0x41, 0x34, 0xcc},
25930c0d06caSMauro Carvalho Chehab 	{0xb3, 0x42, 0x01, 0xcc},
25940c0d06caSMauro Carvalho Chehab 	{0xb3, 0x43, 0xe0, 0xcc},
25950c0d06caSMauro Carvalho Chehab 	{0xbc, 0x00, 0x71, 0xcc},
25960c0d06caSMauro Carvalho Chehab 	{0xbc, 0x01, 0x01, 0xcc},
25970c0d06caSMauro Carvalho Chehab 	{0xb3, 0x01, 0x41, 0xcc},
25980c0d06caSMauro Carvalho Chehab 	{0xb3, 0x4d, 0x00, 0xcc},
25990c0d06caSMauro Carvalho Chehab 	{0x00, 0x0b, 0x2a, 0xaa},
26000c0d06caSMauro Carvalho Chehab 	{0x00, 0x0e, 0x03, 0xaa},
26010c0d06caSMauro Carvalho Chehab 	{0x00, 0x0f, 0xea, 0xaa},
26020c0d06caSMauro Carvalho Chehab 	{0x00, 0x12, 0x08, 0xaa},
26030c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0x06, 0xaa},
26040c0d06caSMauro Carvalho Chehab 	{0x00, 0x21, 0x00, 0xaa},
26050c0d06caSMauro Carvalho Chehab 	{0x00, 0x31, 0x1f, 0xaa},
26060c0d06caSMauro Carvalho Chehab 	{0x00, 0x33, 0x38, 0xaa},
26070c0d06caSMauro Carvalho Chehab 	{0x00, 0x36, 0xc0, 0xaa},
26080c0d06caSMauro Carvalho Chehab 	{0x00, 0x37, 0xc8, 0xaa},
26090c0d06caSMauro Carvalho Chehab 	{0x00, 0x3b, 0x36, 0xaa},
26100c0d06caSMauro Carvalho Chehab 	{0x00, 0x4b, 0xfe, 0xaa},
26110c0d06caSMauro Carvalho Chehab 	{0x00, 0x4d, 0x2e, 0xaa},
26120c0d06caSMauro Carvalho Chehab 	{0x00, 0x51, 0x1c, 0xaa},
26130c0d06caSMauro Carvalho Chehab 	{0x00, 0x52, 0x01, 0xaa},
26140c0d06caSMauro Carvalho Chehab 	{0x00, 0x55, 0x0a, 0xaa},
26150c0d06caSMauro Carvalho Chehab 	{0x00, 0x56, 0x0a, 0xaa},
26160c0d06caSMauro Carvalho Chehab 	{0x00, 0x57, 0x07, 0xaa},
26170c0d06caSMauro Carvalho Chehab 	{0x00, 0x58, 0x07, 0xaa},
26180c0d06caSMauro Carvalho Chehab 	{0x00, 0x59, 0x04, 0xaa},
26190c0d06caSMauro Carvalho Chehab 	{0x00, 0x70, 0x68, 0xaa},
26200c0d06caSMauro Carvalho Chehab 	{0x00, 0x71, 0x04, 0xaa},
26210c0d06caSMauro Carvalho Chehab 	{0x00, 0x72, 0x10, 0xaa},
26220c0d06caSMauro Carvalho Chehab 	{0x00, 0x80, 0x71, 0xaa},
26230c0d06caSMauro Carvalho Chehab 	{0x00, 0x81, 0x08, 0xaa},
26240c0d06caSMauro Carvalho Chehab 	{0x00, 0x82, 0x00, 0xaa},
26250c0d06caSMauro Carvalho Chehab 	{0x00, 0x83, 0x55, 0xaa},
26260c0d06caSMauro Carvalho Chehab 	{0x00, 0x84, 0x06, 0xaa},
26270c0d06caSMauro Carvalho Chehab 	{0x00, 0x85, 0x06, 0xaa},
26280c0d06caSMauro Carvalho Chehab 	{0x00, 0x8b, 0x25, 0xaa},
26290c0d06caSMauro Carvalho Chehab 	{0x00, 0x8c, 0x00, 0xaa},
26300c0d06caSMauro Carvalho Chehab 	{0x00, 0x8d, 0x86, 0xaa},
26310c0d06caSMauro Carvalho Chehab 	{0x00, 0x8e, 0x82, 0xaa},
26320c0d06caSMauro Carvalho Chehab 	{0x00, 0x8f, 0x2d, 0xaa},
26330c0d06caSMauro Carvalho Chehab 	{0x00, 0x90, 0x8b, 0xaa},
26340c0d06caSMauro Carvalho Chehab 	{0x00, 0x91, 0x81, 0xaa},
26350c0d06caSMauro Carvalho Chehab 	{0x00, 0x92, 0x81, 0xaa},
26360c0d06caSMauro Carvalho Chehab 	{0x00, 0x93, 0x23, 0xaa},
26370c0d06caSMauro Carvalho Chehab 	{0x00, 0xa3, 0x2a, 0xaa},
26380c0d06caSMauro Carvalho Chehab 	{0x00, 0xa4, 0x03, 0xaa},
26390c0d06caSMauro Carvalho Chehab 	{0x00, 0xa5, 0xea, 0xaa},
26400c0d06caSMauro Carvalho Chehab 	{0x00, 0xb0, 0x68, 0xaa},
26410c0d06caSMauro Carvalho Chehab 	{0x00, 0xbc, 0x04, 0xaa},
26420c0d06caSMauro Carvalho Chehab 	{0x00, 0xbe, 0x3b, 0xaa},
26430c0d06caSMauro Carvalho Chehab 	{0x00, 0x4e, 0x40, 0xaa},
26440c0d06caSMauro Carvalho Chehab 	{0x00, 0x06, 0x04, 0xaa},
26450c0d06caSMauro Carvalho Chehab 	{0x00, 0x07, 0x03, 0xaa},
26460c0d06caSMauro Carvalho Chehab 	{0x00, 0xcd, 0x18, 0xaa},
26470c0d06caSMauro Carvalho Chehab 	{0x00, 0x28, 0x03, 0xaa},
26480c0d06caSMauro Carvalho Chehab 	{0x00, 0x29, 0xef, 0xaa},
26490c0d06caSMauro Carvalho Chehab /* reinit on alt 2 (qvga) or alt7 (vga) */
26500c0d06caSMauro Carvalho Chehab 	{0xb3, 0x05, 0x00, 0xcc},
26510c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x00, 0xcc},
26520c0d06caSMauro Carvalho Chehab 	{0xb8, 0x00, 0x01, 0xcc},
26530c0d06caSMauro Carvalho Chehab 
26540c0d06caSMauro Carvalho Chehab 	{0x00, 0x1d, 0x85, 0xaa},
26550c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0xc6, 0xaa},
26560c0d06caSMauro Carvalho Chehab 	{0x00, 0x00, 0x40, 0xdd},
26570c0d06caSMauro Carvalho Chehab 	{0x00, 0x1d, 0x05, 0xaa},
26580c0d06caSMauro Carvalho Chehab 	{}
26590c0d06caSMauro Carvalho Chehab };
26600c0d06caSMauro Carvalho Chehab static const u8 poxxxx_gamma[][4] = {
26610c0d06caSMauro Carvalho Chehab 	{0x00, 0xd6, 0x22, 0xaa},	/* gamma 0 */
26620c0d06caSMauro Carvalho Chehab 	{0x00, 0x73, 0x00, 0xaa},
26630c0d06caSMauro Carvalho Chehab 	{0x00, 0x74, 0x0a, 0xaa},
26640c0d06caSMauro Carvalho Chehab 	{0x00, 0x75, 0x16, 0xaa},
26650c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0x25, 0xaa},
26660c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x34, 0xaa},
26670c0d06caSMauro Carvalho Chehab 	{0x00, 0x78, 0x49, 0xaa},
26680c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x5a, 0xaa},
26690c0d06caSMauro Carvalho Chehab 	{0x00, 0x7a, 0x7f, 0xaa},
26700c0d06caSMauro Carvalho Chehab 	{0x00, 0x7b, 0x9b, 0xaa},
26710c0d06caSMauro Carvalho Chehab 	{0x00, 0x7c, 0xba, 0xaa},
26720c0d06caSMauro Carvalho Chehab 	{0x00, 0x7d, 0xd4, 0xaa},
26730c0d06caSMauro Carvalho Chehab 	{0x00, 0x7e, 0xea, 0xaa},
26740c0d06caSMauro Carvalho Chehab 
26750c0d06caSMauro Carvalho Chehab 	{0x00, 0xd6, 0x62, 0xaa},	/* gamma 1 */
26760c0d06caSMauro Carvalho Chehab 	{0x00, 0x73, 0x00, 0xaa},
26770c0d06caSMauro Carvalho Chehab 	{0x00, 0x74, 0x0a, 0xaa},
26780c0d06caSMauro Carvalho Chehab 	{0x00, 0x75, 0x16, 0xaa},
26790c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0x25, 0xaa},
26800c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x34, 0xaa},
26810c0d06caSMauro Carvalho Chehab 	{0x00, 0x78, 0x49, 0xaa},
26820c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x5a, 0xaa},
26830c0d06caSMauro Carvalho Chehab 	{0x00, 0x7a, 0x7f, 0xaa},
26840c0d06caSMauro Carvalho Chehab 	{0x00, 0x7b, 0x9b, 0xaa},
26850c0d06caSMauro Carvalho Chehab 	{0x00, 0x7c, 0xba, 0xaa},
26860c0d06caSMauro Carvalho Chehab 	{0x00, 0x7d, 0xd4, 0xaa},
26870c0d06caSMauro Carvalho Chehab 	{0x00, 0x7e, 0xea, 0xaa},
26880c0d06caSMauro Carvalho Chehab 
26890c0d06caSMauro Carvalho Chehab 	{0x00, 0xd6, 0xa2, 0xaa},	/* gamma 2 */
26900c0d06caSMauro Carvalho Chehab 	{0x00, 0x73, 0x00, 0xaa},
26910c0d06caSMauro Carvalho Chehab 	{0x00, 0x74, 0x0a, 0xaa},
26920c0d06caSMauro Carvalho Chehab 	{0x00, 0x75, 0x16, 0xaa},
26930c0d06caSMauro Carvalho Chehab 	{0x00, 0x76, 0x25, 0xaa},
26940c0d06caSMauro Carvalho Chehab 	{0x00, 0x77, 0x34, 0xaa},
26950c0d06caSMauro Carvalho Chehab 	{0x00, 0x78, 0x49, 0xaa},
26960c0d06caSMauro Carvalho Chehab 	{0x00, 0x79, 0x5a, 0xaa},
26970c0d06caSMauro Carvalho Chehab 	{0x00, 0x7a, 0x7f, 0xaa},
26980c0d06caSMauro Carvalho Chehab 	{0x00, 0x7b, 0x9b, 0xaa},
26990c0d06caSMauro Carvalho Chehab 	{0x00, 0x7c, 0xba, 0xaa},
27000c0d06caSMauro Carvalho Chehab 	{0x00, 0x7d, 0xd4, 0xaa},
27010c0d06caSMauro Carvalho Chehab 	{0x00, 0x7e, 0xea, 0xaa},
27020c0d06caSMauro Carvalho Chehab 	{}
27030c0d06caSMauro Carvalho Chehab };
27040c0d06caSMauro Carvalho Chehab static const u8 poxxxx_init_start_3[][4] = {
27050c0d06caSMauro Carvalho Chehab 	{0x00, 0xb8, 0x28, 0xaa},
27060c0d06caSMauro Carvalho Chehab 	{0x00, 0xb9, 0x1e, 0xaa},
27070c0d06caSMauro Carvalho Chehab 	{0x00, 0xb6, 0x14, 0xaa},
27080c0d06caSMauro Carvalho Chehab 	{0x00, 0xb7, 0x0f, 0xaa},
27090c0d06caSMauro Carvalho Chehab 	{0x00, 0x5c, 0x10, 0xaa},
27100c0d06caSMauro Carvalho Chehab 	{0x00, 0x5d, 0x18, 0xaa},
27110c0d06caSMauro Carvalho Chehab 	{0x00, 0x5e, 0x24, 0xaa},
27120c0d06caSMauro Carvalho Chehab 	{0x00, 0x5f, 0x24, 0xaa},
27130c0d06caSMauro Carvalho Chehab 	{0x00, 0x86, 0x1a, 0xaa},
27140c0d06caSMauro Carvalho Chehab 	{0x00, 0x60, 0x00, 0xaa},
27150c0d06caSMauro Carvalho Chehab 	{0x00, 0x61, 0x1b, 0xaa},
27160c0d06caSMauro Carvalho Chehab 	{0x00, 0x62, 0x30, 0xaa},
27170c0d06caSMauro Carvalho Chehab 	{0x00, 0x63, 0x40, 0xaa},
27180c0d06caSMauro Carvalho Chehab 	{0x00, 0x87, 0x1a, 0xaa},
27190c0d06caSMauro Carvalho Chehab 	{0x00, 0x64, 0x00, 0xaa},
27200c0d06caSMauro Carvalho Chehab 	{0x00, 0x65, 0x08, 0xaa},
27210c0d06caSMauro Carvalho Chehab 	{0x00, 0x66, 0x10, 0xaa},
27220c0d06caSMauro Carvalho Chehab 	{0x00, 0x67, 0x20, 0xaa},
27230c0d06caSMauro Carvalho Chehab 	{0x00, 0x88, 0x10, 0xaa},
27240c0d06caSMauro Carvalho Chehab 	{0x00, 0x68, 0x00, 0xaa},
27250c0d06caSMauro Carvalho Chehab 	{0x00, 0x69, 0x08, 0xaa},
27260c0d06caSMauro Carvalho Chehab 	{0x00, 0x6a, 0x0f, 0xaa},
27270c0d06caSMauro Carvalho Chehab 	{0x00, 0x6b, 0x0f, 0xaa},
27280c0d06caSMauro Carvalho Chehab 	{0x00, 0x89, 0x07, 0xaa},
27290c0d06caSMauro Carvalho Chehab 	{0x00, 0xd5, 0x4c, 0xaa},
27300c0d06caSMauro Carvalho Chehab 	{0x00, 0x0a, 0x00, 0xaa},
27310c0d06caSMauro Carvalho Chehab 	{0x00, 0x0b, 0x2a, 0xaa},
27320c0d06caSMauro Carvalho Chehab 	{0x00, 0x0e, 0x03, 0xaa},
27330c0d06caSMauro Carvalho Chehab 	{0x00, 0x0f, 0xea, 0xaa},
27340c0d06caSMauro Carvalho Chehab 	{0x00, 0xa2, 0x00, 0xaa},
27350c0d06caSMauro Carvalho Chehab 	{0x00, 0xa3, 0x2a, 0xaa},
27360c0d06caSMauro Carvalho Chehab 	{0x00, 0xa4, 0x03, 0xaa},
27370c0d06caSMauro Carvalho Chehab 	{0x00, 0xa5, 0xea, 0xaa},
27380c0d06caSMauro Carvalho Chehab 	{}
27390c0d06caSMauro Carvalho Chehab };
27400c0d06caSMauro Carvalho Chehab static const u8 poxxxx_initVGA[][4] = {
27410c0d06caSMauro Carvalho Chehab 	{0x00, 0x20, 0x11, 0xaa},
27420c0d06caSMauro Carvalho Chehab 	{0x00, 0x33, 0x38, 0xaa},
27430c0d06caSMauro Carvalho Chehab 	{0x00, 0xbb, 0x0d, 0xaa},
27440c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x01, 0xcc},	/* change to 640x480 */
27450c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xe0, 0xcc},
27460c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x02, 0xcc},
27470c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x7f, 0xcc},
27480c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0xb0, 0xcc},
27490c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x00, 0xcc},
27500c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x01, 0xcc},
27510c0d06caSMauro Carvalho Chehab 	{0x00, 0x04, 0x06, 0xaa},
27520c0d06caSMauro Carvalho Chehab 	{0x00, 0x05, 0x3f, 0xaa},
27530c0d06caSMauro Carvalho Chehab 	{0x00, 0x04, 0x00, 0xdd},	/* delay 1s */
27540c0d06caSMauro Carvalho Chehab 	{}
27550c0d06caSMauro Carvalho Chehab };
27560c0d06caSMauro Carvalho Chehab static const u8 poxxxx_initQVGA[][4] = {
27570c0d06caSMauro Carvalho Chehab 	{0x00, 0x20, 0x33, 0xaa},
27580c0d06caSMauro Carvalho Chehab 	{0x00, 0x33, 0x38, 0xaa},
27590c0d06caSMauro Carvalho Chehab 	{0x00, 0xbb, 0x0d, 0xaa},
27600c0d06caSMauro Carvalho Chehab 	{0xb3, 0x22, 0x00, 0xcc},	/* change to 320x240 */
27610c0d06caSMauro Carvalho Chehab 	{0xb3, 0x23, 0xf0, 0xcc},
27620c0d06caSMauro Carvalho Chehab 	{0xb3, 0x16, 0x01, 0xcc},
27630c0d06caSMauro Carvalho Chehab 	{0xb3, 0x17, 0x3f, 0xcc},
27640c0d06caSMauro Carvalho Chehab 	{0xb3, 0x02, 0xb0, 0xcc},
27650c0d06caSMauro Carvalho Chehab 	{0xb3, 0x06, 0x01, 0xcc},
27660c0d06caSMauro Carvalho Chehab 	{0xb3, 0x5c, 0x00, 0xcc},
27670c0d06caSMauro Carvalho Chehab 	{0x00, 0x04, 0x06, 0xaa},
27680c0d06caSMauro Carvalho Chehab 	{0x00, 0x05, 0x3f, 0xaa},
27690c0d06caSMauro Carvalho Chehab 	{0x00, 0x04, 0x00, 0xdd},	/* delay 1s */
27700c0d06caSMauro Carvalho Chehab 	{}
27710c0d06caSMauro Carvalho Chehab };
27720c0d06caSMauro Carvalho Chehab static const u8 poxxxx_init_end_1[][4] = {
27730c0d06caSMauro Carvalho Chehab 	{0x00, 0x47, 0x25, 0xaa},
27740c0d06caSMauro Carvalho Chehab 	{0x00, 0x48, 0x80, 0xaa},
27750c0d06caSMauro Carvalho Chehab 	{0x00, 0x49, 0x1f, 0xaa},
27760c0d06caSMauro Carvalho Chehab 	{0x00, 0x4a, 0x40, 0xaa},
27770c0d06caSMauro Carvalho Chehab 	{0x00, 0x44, 0x40, 0xaa},
27780c0d06caSMauro Carvalho Chehab 	{0x00, 0xab, 0x4a, 0xaa},
27790c0d06caSMauro Carvalho Chehab 	{0x00, 0xb1, 0x00, 0xaa},
27800c0d06caSMauro Carvalho Chehab 	{0x00, 0xb2, 0x04, 0xaa},
27810c0d06caSMauro Carvalho Chehab 	{0x00, 0xb3, 0x08, 0xaa},
27820c0d06caSMauro Carvalho Chehab 	{0x00, 0xb4, 0x0b, 0xaa},
27830c0d06caSMauro Carvalho Chehab 	{0x00, 0xb5, 0x0d, 0xaa},
27840c0d06caSMauro Carvalho Chehab 	{}
27850c0d06caSMauro Carvalho Chehab };
27860c0d06caSMauro Carvalho Chehab static const u8 poxxxx_init_end_2[][4] = {
27870c0d06caSMauro Carvalho Chehab 	{0x00, 0x1d, 0x85, 0xaa},
27880c0d06caSMauro Carvalho Chehab 	{0x00, 0x1e, 0x06, 0xaa},
27890c0d06caSMauro Carvalho Chehab 	{0x00, 0x1d, 0x05, 0xaa},
27900c0d06caSMauro Carvalho Chehab 	{}
27910c0d06caSMauro Carvalho Chehab };
27920c0d06caSMauro Carvalho Chehab 
27930c0d06caSMauro Carvalho Chehab struct sensor_info {
27940c0d06caSMauro Carvalho Chehab 	s8 sensorId;
27950c0d06caSMauro Carvalho Chehab 	u8 I2cAdd;
27960c0d06caSMauro Carvalho Chehab 	u8 IdAdd;
27970c0d06caSMauro Carvalho Chehab 	u16 VpId;
27980c0d06caSMauro Carvalho Chehab 	u8 m1;
27990c0d06caSMauro Carvalho Chehab 	u8 m2;
28000c0d06caSMauro Carvalho Chehab 	u8 op;
28010c0d06caSMauro Carvalho Chehab };
28020c0d06caSMauro Carvalho Chehab 
28030c0d06caSMauro Carvalho Chehab /* probe values */
28040c0d06caSMauro Carvalho Chehab static const struct sensor_info vc0321_probe_data[] = {
28050c0d06caSMauro Carvalho Chehab /*      sensorId,	   I2cAdd,	IdAdd,  VpId,  m1,    m2,  op */
28060c0d06caSMauro Carvalho Chehab /* 0 OV9640 */
28070c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x30, 0x0a, 0x0000, 0x25, 0x24, 0x05},
28080c0d06caSMauro Carvalho Chehab /* 1 ICM108T (may respond on IdAdd == 0x83 - tested in vc032x_probe_sensor) */
28090c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x20, 0x82, 0x0000, 0x24, 0x25, 0x01},
28100c0d06caSMauro Carvalho Chehab /* 2 PO2130 (may detect PO3130NC - tested in vc032x_probe_sensor)*/
28110c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x76, 0x00, 0x0000, 0x24, 0x25, 0x01},
28120c0d06caSMauro Carvalho Chehab /* 3 MI1310 */
28130c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x5d, 0x00, 0x0000, 0x24, 0x25, 0x01},
28140c0d06caSMauro Carvalho Chehab /* 4 MI360 - tested in vc032x_probe_sensor */
28150c0d06caSMauro Carvalho Chehab /*	{SENSOR_MI0360,	    0x80 | 0x5d, 0x00, 0x8243, 0x24, 0x25, 0x01}, */
28160c0d06caSMauro Carvalho Chehab /* 5 7131R */
28170c0d06caSMauro Carvalho Chehab 	{SENSOR_HV7131R,    0x80 | 0x11, 0x00, 0x0209, 0x24, 0x25, 0x01},
28180c0d06caSMauro Carvalho Chehab /* 6 OV7649 */
28190c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x21, 0x0a, 0x0000, 0x21, 0x20, 0x05},
28200c0d06caSMauro Carvalho Chehab /* 7 PAS302BCW */
28210c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x40, 0x00, 0x0000, 0x20, 0x22, 0x05},
28220c0d06caSMauro Carvalho Chehab /* 8 OV7660 */
28230c0d06caSMauro Carvalho Chehab 	{SENSOR_OV7660,     0x80 | 0x21, 0x0a, 0x7660, 0x26, 0x26, 0x05},
28240c0d06caSMauro Carvalho Chehab /* 9 PO3130NC - (tested in vc032x_probe_sensor) */
28250c0d06caSMauro Carvalho Chehab /*	{SENSOR_PO3130NC,   0x80 | 0x76, 0x00, 0x3130, 0x24, 0x25, 0x01}, */
28260c0d06caSMauro Carvalho Chehab /* 10 PO1030KC */
28270c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x6e, 0x00, 0x0000, 0x24, 0x25, 0x01},
28280c0d06caSMauro Carvalho Chehab /* 11 MI1310_SOC */
28290c0d06caSMauro Carvalho Chehab 	{SENSOR_MI1310_SOC, 0x80 | 0x5d, 0x00, 0x143a, 0x24, 0x25, 0x01},
28300c0d06caSMauro Carvalho Chehab /* 12 OV9650 */
28310c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x30, 0x0a, 0x0000, 0x25, 0x24, 0x05},
28320c0d06caSMauro Carvalho Chehab /* 13 S5K532 */
28330c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x11, 0x39, 0x0000, 0x24, 0x25, 0x01},
28340c0d06caSMauro Carvalho Chehab /* 14 MI360_SOC - ??? */
28350c0d06caSMauro Carvalho Chehab /* 15 PO1200N */
28360c0d06caSMauro Carvalho Chehab 	{SENSOR_PO1200,     0x80 | 0x5c, 0x00, 0x1200, 0x67, 0x67, 0x01},
28370c0d06caSMauro Carvalho Chehab /* 16 PO3030K */
28380c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x18, 0x00, 0x0000, 0x24, 0x25, 0x01},
28390c0d06caSMauro Carvalho Chehab /* 17 PO2030 */
28400c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x6e, 0x00, 0x0000, 0x24, 0x25, 0x01},
28410c0d06caSMauro Carvalho Chehab /* ?? */
28420c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x56, 0x01, 0x0000, 0x64, 0x67, 0x01},
28430c0d06caSMauro Carvalho Chehab 	{SENSOR_MI1320,     0x80 | 0x48, 0x00, 0x148c, 0x64, 0x65, 0x01},
28440c0d06caSMauro Carvalho Chehab };
28450c0d06caSMauro Carvalho Chehab static const struct sensor_info vc0323_probe_data[] = {
28460c0d06caSMauro Carvalho Chehab /*      sensorId,	   I2cAdd,	IdAdd,  VpId,  m1,    m2,  op */
28470c0d06caSMauro Carvalho Chehab /* 0 OV9640 */
28480c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x30, 0x0a, 0x0000, 0x25, 0x24, 0x05},
28490c0d06caSMauro Carvalho Chehab /* 1 ICM108T (may respond on IdAdd == 0x83 - tested in vc032x_probe_sensor) */
28500c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x20, 0x82, 0x0000, 0x24, 0x25, 0x01},
28510c0d06caSMauro Carvalho Chehab /* 2 PO2130 (may detect PO3130NC - tested in vc032x_probe_sensor)*/
28520c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x76, 0x00, 0x0000, 0x24, 0x25, 0x01},
28530c0d06caSMauro Carvalho Chehab /* 3 MI1310 */
28540c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x5d, 0x00, 0x0000, 0x24, 0x25, 0x01},
28550c0d06caSMauro Carvalho Chehab /* 4 MI360 - tested in vc032x_probe_sensor */
28560c0d06caSMauro Carvalho Chehab /*	{SENSOR_MI0360,	    0x80 | 0x5d, 0x00, 0x8243, 0x24, 0x25, 0x01}, */
28570c0d06caSMauro Carvalho Chehab /* 5 7131R */
28580c0d06caSMauro Carvalho Chehab 	{SENSOR_HV7131R,    0x80 | 0x11, 0x00, 0x0209, 0x24, 0x25, 0x01},
28590c0d06caSMauro Carvalho Chehab /* 6 OV7649 */
28600c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x21, 0x0a, 0x0000, 0x21, 0x20, 0x05},
28610c0d06caSMauro Carvalho Chehab /* 7 PAS302BCW */
28620c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x40, 0x00, 0x0000, 0x20, 0x22, 0x05},
28630c0d06caSMauro Carvalho Chehab /* 8 OV7660 */
28640c0d06caSMauro Carvalho Chehab 	{SENSOR_OV7660,     0x80 | 0x21, 0x0a, 0x7660, 0x26, 0x26, 0x05},
28650c0d06caSMauro Carvalho Chehab /* 9 PO3130NC - (tested in vc032x_probe_sensor) */
28660c0d06caSMauro Carvalho Chehab /*	{SENSOR_PO3130NC,   0x80 | 0x76, 0x00, 0x3130, 0x24, 0x25, 0x01}, */
28670c0d06caSMauro Carvalho Chehab /* 10 PO1030KC */
28680c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x6e, 0x00, 0x0000, 0x24, 0x25, 0x01},
28690c0d06caSMauro Carvalho Chehab /* 11 MI1310_SOC */
28700c0d06caSMauro Carvalho Chehab 	{SENSOR_MI1310_SOC, 0x80 | 0x5d, 0x00, 0x143a, 0x24, 0x25, 0x01},
28710c0d06caSMauro Carvalho Chehab /* 12 OV9650 */
28720c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x30, 0x0a, 0x0000, 0x25, 0x24, 0x05},
28730c0d06caSMauro Carvalho Chehab /* 13 S5K532 */
28740c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x11, 0x39, 0x0000, 0x24, 0x25, 0x01},
28750c0d06caSMauro Carvalho Chehab /* 14 MI360_SOC - ??? */
28760c0d06caSMauro Carvalho Chehab /* 15 PO1200N */
28770c0d06caSMauro Carvalho Chehab 	{SENSOR_PO1200,     0x80 | 0x5c, 0x00, 0x1200, 0x67, 0x67, 0x01},
28780c0d06caSMauro Carvalho Chehab /* 16 ?? */
28790c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x2d, 0x00, 0x0000, 0x65, 0x67, 0x01},
28800c0d06caSMauro Carvalho Chehab /* 17 PO2030 */
28810c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x6e, 0x00, 0x0000, 0x24, 0x25, 0x01},
28820c0d06caSMauro Carvalho Chehab /* ?? */
28830c0d06caSMauro Carvalho Chehab 	{-1,		    0x80 | 0x56, 0x01, 0x0000, 0x64, 0x67, 0x01},
28840c0d06caSMauro Carvalho Chehab 	{SENSOR_MI1320_SOC, 0x80 | 0x48, 0x00, 0x148c, 0x64, 0x67, 0x01},
28850c0d06caSMauro Carvalho Chehab /*fixme: not in the ms-win probe - may be found before? */
28860c0d06caSMauro Carvalho Chehab 	{SENSOR_OV7670,     0x80 | 0x21, 0x0a, 0x7673, 0x66, 0x67, 0x05},
28870c0d06caSMauro Carvalho Chehab };
28880c0d06caSMauro Carvalho Chehab 
28890c0d06caSMauro Carvalho Chehab /* read 'len' bytes in gspca_dev->usb_buf */
reg_r_i(struct gspca_dev * gspca_dev,u16 req,u16 index,u16 len)28900c0d06caSMauro Carvalho Chehab static void reg_r_i(struct gspca_dev *gspca_dev,
28910c0d06caSMauro Carvalho Chehab 		  u16 req,
28920c0d06caSMauro Carvalho Chehab 		  u16 index,
28930c0d06caSMauro Carvalho Chehab 		  u16 len)
28940c0d06caSMauro Carvalho Chehab {
28950c0d06caSMauro Carvalho Chehab 	int ret;
28960c0d06caSMauro Carvalho Chehab 
28970c0d06caSMauro Carvalho Chehab 	if (gspca_dev->usb_err < 0)
28980c0d06caSMauro Carvalho Chehab 		return;
28990c0d06caSMauro Carvalho Chehab 	ret = usb_control_msg(gspca_dev->dev,
29000c0d06caSMauro Carvalho Chehab 			usb_rcvctrlpipe(gspca_dev->dev, 0),
29010c0d06caSMauro Carvalho Chehab 			req,
29020c0d06caSMauro Carvalho Chehab 			USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
29030c0d06caSMauro Carvalho Chehab 			1,			/* value */
29040c0d06caSMauro Carvalho Chehab 			index, gspca_dev->usb_buf, len,
29050c0d06caSMauro Carvalho Chehab 			500);
29060c0d06caSMauro Carvalho Chehab 	if (ret < 0) {
29070c0d06caSMauro Carvalho Chehab 		pr_err("reg_r err %d\n", ret);
29080c0d06caSMauro Carvalho Chehab 		gspca_dev->usb_err = ret;
29094843a543SHans Verkuil 		/*
29104843a543SHans Verkuil 		 * Make sure the buffer is zeroed to avoid uninitialized
29114843a543SHans Verkuil 		 * values.
29124843a543SHans Verkuil 		 */
29134843a543SHans Verkuil 		memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
29140c0d06caSMauro Carvalho Chehab 	}
29150c0d06caSMauro Carvalho Chehab }
reg_r(struct gspca_dev * gspca_dev,u16 req,u16 index,u16 len)29160c0d06caSMauro Carvalho Chehab static void reg_r(struct gspca_dev *gspca_dev,
29170c0d06caSMauro Carvalho Chehab 		  u16 req,
29180c0d06caSMauro Carvalho Chehab 		  u16 index,
29190c0d06caSMauro Carvalho Chehab 		  u16 len)
29200c0d06caSMauro Carvalho Chehab {
29210c0d06caSMauro Carvalho Chehab 	reg_r_i(gspca_dev, req, index, len);
29220c0d06caSMauro Carvalho Chehab 	if (gspca_dev->usb_err < 0)
29230c0d06caSMauro Carvalho Chehab 		return;
29240c0d06caSMauro Carvalho Chehab 	if (len == 1)
292537d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_USBI, "GET %02x 0001 %04x %02x\n",
292637d5efb0SJoe Perches 			  req, index,
29270c0d06caSMauro Carvalho Chehab 			  gspca_dev->usb_buf[0]);
29280c0d06caSMauro Carvalho Chehab 	else
292937d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_USBI, "GET %02x 0001 %04x %*ph\n",
29300c0d06caSMauro Carvalho Chehab 			  req, index, 3, gspca_dev->usb_buf);
29310c0d06caSMauro Carvalho Chehab }
29320c0d06caSMauro Carvalho Chehab 
reg_w_i(struct gspca_dev * gspca_dev,u16 req,u16 value,u16 index)29330c0d06caSMauro Carvalho Chehab static void reg_w_i(struct gspca_dev *gspca_dev,
29340c0d06caSMauro Carvalho Chehab 			    u16 req,
29350c0d06caSMauro Carvalho Chehab 			    u16 value,
29360c0d06caSMauro Carvalho Chehab 			    u16 index)
29370c0d06caSMauro Carvalho Chehab {
29380c0d06caSMauro Carvalho Chehab 	int ret;
29390c0d06caSMauro Carvalho Chehab 
29400c0d06caSMauro Carvalho Chehab 	if (gspca_dev->usb_err < 0)
29410c0d06caSMauro Carvalho Chehab 		return;
29420c0d06caSMauro Carvalho Chehab 	ret = usb_control_msg(gspca_dev->dev,
29430c0d06caSMauro Carvalho Chehab 			usb_sndctrlpipe(gspca_dev->dev, 0),
29440c0d06caSMauro Carvalho Chehab 			req,
29450c0d06caSMauro Carvalho Chehab 			USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
29460c0d06caSMauro Carvalho Chehab 			value, index, NULL, 0,
29470c0d06caSMauro Carvalho Chehab 			500);
29480c0d06caSMauro Carvalho Chehab 	if (ret < 0) {
29490c0d06caSMauro Carvalho Chehab 		pr_err("reg_w err %d\n", ret);
29500c0d06caSMauro Carvalho Chehab 		gspca_dev->usb_err = ret;
29510c0d06caSMauro Carvalho Chehab 	}
29520c0d06caSMauro Carvalho Chehab }
reg_w(struct gspca_dev * gspca_dev,u16 req,u16 value,u16 index)29530c0d06caSMauro Carvalho Chehab static void reg_w(struct gspca_dev *gspca_dev,
29540c0d06caSMauro Carvalho Chehab 			    u16 req,
29550c0d06caSMauro Carvalho Chehab 			    u16 value,
29560c0d06caSMauro Carvalho Chehab 			    u16 index)
29570c0d06caSMauro Carvalho Chehab {
29580c0d06caSMauro Carvalho Chehab 	if (gspca_dev->usb_err < 0)
29590c0d06caSMauro Carvalho Chehab 		return;
296037d5efb0SJoe Perches 	gspca_dbg(gspca_dev, D_USBO, "SET %02x %04x %04x\n", req, value, index);
29610c0d06caSMauro Carvalho Chehab 	reg_w_i(gspca_dev, req, value, index);
29620c0d06caSMauro Carvalho Chehab }
29630c0d06caSMauro Carvalho Chehab 
read_sensor_register(struct gspca_dev * gspca_dev,u16 address)29640c0d06caSMauro Carvalho Chehab static u16 read_sensor_register(struct gspca_dev *gspca_dev,
29650c0d06caSMauro Carvalho Chehab 				u16 address)
29660c0d06caSMauro Carvalho Chehab {
29670c0d06caSMauro Carvalho Chehab 	u8 ldata, mdata, hdata;
29680c0d06caSMauro Carvalho Chehab 	int retry = 50;
29690c0d06caSMauro Carvalho Chehab 
29700c0d06caSMauro Carvalho Chehab 	reg_r(gspca_dev, 0xa1, 0xb33f, 1);
29710c0d06caSMauro Carvalho Chehab 	if (!(gspca_dev->usb_buf[0] & 0x02)) {
29720c0d06caSMauro Carvalho Chehab 		pr_err("I2c Bus Busy Wait %02x\n", gspca_dev->usb_buf[0]);
29730c0d06caSMauro Carvalho Chehab 		return 0;
29740c0d06caSMauro Carvalho Chehab 	}
29750c0d06caSMauro Carvalho Chehab 	reg_w(gspca_dev, 0xa0, address, 0xb33a);
29760c0d06caSMauro Carvalho Chehab 	reg_w(gspca_dev, 0xa0, 0x02, 0xb339);
29770c0d06caSMauro Carvalho Chehab 
29780c0d06caSMauro Carvalho Chehab 	do {
29790c0d06caSMauro Carvalho Chehab 		reg_r(gspca_dev, 0xa1, 0xb33b, 1);
29800c0d06caSMauro Carvalho Chehab 		if (gspca_dev->usb_buf[0] == 0x00)
29810c0d06caSMauro Carvalho Chehab 			break;
29820c0d06caSMauro Carvalho Chehab 		msleep(40);
29830c0d06caSMauro Carvalho Chehab 	} while (--retry >= 0);
29840c0d06caSMauro Carvalho Chehab 
29850c0d06caSMauro Carvalho Chehab 	reg_r(gspca_dev, 0xa1, 0xb33e, 1);
29860c0d06caSMauro Carvalho Chehab 	ldata = gspca_dev->usb_buf[0];
29870c0d06caSMauro Carvalho Chehab 	reg_r(gspca_dev, 0xa1, 0xb33d, 1);
29880c0d06caSMauro Carvalho Chehab 	mdata = gspca_dev->usb_buf[0];
29890c0d06caSMauro Carvalho Chehab 	reg_r(gspca_dev, 0xa1, 0xb33c, 1);
29900c0d06caSMauro Carvalho Chehab 	hdata = gspca_dev->usb_buf[0];
29910c0d06caSMauro Carvalho Chehab 	if (hdata != 0 && mdata != 0 && ldata != 0)
299237d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Read Sensor %02x%02x %02x\n",
29930c0d06caSMauro Carvalho Chehab 			  hdata, mdata, ldata);
29940c0d06caSMauro Carvalho Chehab 	reg_r(gspca_dev, 0xa1, 0xb334, 1);
29950c0d06caSMauro Carvalho Chehab 	if (gspca_dev->usb_buf[0] == 0x02)
29960c0d06caSMauro Carvalho Chehab 		return (hdata << 8) + mdata;
29970c0d06caSMauro Carvalho Chehab 	return hdata;
29980c0d06caSMauro Carvalho Chehab }
29990c0d06caSMauro Carvalho Chehab 
vc032x_probe_sensor(struct gspca_dev * gspca_dev)30000c0d06caSMauro Carvalho Chehab static int vc032x_probe_sensor(struct gspca_dev *gspca_dev)
30010c0d06caSMauro Carvalho Chehab {
30020c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *) gspca_dev;
30030c0d06caSMauro Carvalho Chehab 	int i, n;
30040c0d06caSMauro Carvalho Chehab 	u16 value;
30050c0d06caSMauro Carvalho Chehab 	const struct sensor_info *ptsensor_info;
30060c0d06caSMauro Carvalho Chehab 
30070c0d06caSMauro Carvalho Chehab /*fixme: should also check the other sensor (back mi1320_soc, front mc501cb)*/
30080c0d06caSMauro Carvalho Chehab 	if (sd->flags & FL_SAMSUNG) {
30090c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0x01, 0xb301);
30100c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0x89, 0xf0ff, 0xffff);
30110c0d06caSMauro Carvalho Chehab 						/* select the back sensor */
30120c0d06caSMauro Carvalho Chehab 	}
30130c0d06caSMauro Carvalho Chehab 
30140c0d06caSMauro Carvalho Chehab 	reg_r(gspca_dev, 0xa1, 0xbfcf, 1);
301537d5efb0SJoe Perches 	gspca_dbg(gspca_dev, D_PROBE, "vc032%d check sensor header %02x\n",
30160c0d06caSMauro Carvalho Chehab 		  sd->bridge == BRIDGE_VC0321 ? 1 : 3, gspca_dev->usb_buf[0]);
30170c0d06caSMauro Carvalho Chehab 	if (sd->bridge == BRIDGE_VC0321) {
30180c0d06caSMauro Carvalho Chehab 		ptsensor_info = vc0321_probe_data;
30190c0d06caSMauro Carvalho Chehab 		n = ARRAY_SIZE(vc0321_probe_data);
30200c0d06caSMauro Carvalho Chehab 	} else {
30210c0d06caSMauro Carvalho Chehab 		ptsensor_info = vc0323_probe_data;
30220c0d06caSMauro Carvalho Chehab 		n = ARRAY_SIZE(vc0323_probe_data);
30230c0d06caSMauro Carvalho Chehab 	}
30240c0d06caSMauro Carvalho Chehab 	for (i = 0; i < n; i++) {
30250c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0x02, 0xb334);
30260c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, ptsensor_info->m1, 0xb300);
30270c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, ptsensor_info->m2, 0xb300);
30280c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0x01, 0xb308);
30290c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0x0c, 0xb309);
30300c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, ptsensor_info->I2cAdd, 0xb335);
30310c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, ptsensor_info->op, 0xb301);
30320c0d06caSMauro Carvalho Chehab 		value = read_sensor_register(gspca_dev, ptsensor_info->IdAdd);
30330c0d06caSMauro Carvalho Chehab 		if (value == 0 && ptsensor_info->IdAdd == 0x82)
30340c0d06caSMauro Carvalho Chehab 			value = read_sensor_register(gspca_dev, 0x83);
30350c0d06caSMauro Carvalho Chehab 		if (value != 0) {
303637d5efb0SJoe Perches 			gspca_dbg(gspca_dev, D_PROBE, "Sensor ID %04x (%d)\n",
303737d5efb0SJoe Perches 				  value, i);
30380c0d06caSMauro Carvalho Chehab 			if (value == ptsensor_info->VpId)
30390c0d06caSMauro Carvalho Chehab 				return ptsensor_info->sensorId;
30400c0d06caSMauro Carvalho Chehab 
30410c0d06caSMauro Carvalho Chehab 			switch (value) {
30420c0d06caSMauro Carvalho Chehab 			case 0x3130:
30430c0d06caSMauro Carvalho Chehab 				return SENSOR_PO3130NC;
30440c0d06caSMauro Carvalho Chehab 			case 0x7673:
30450c0d06caSMauro Carvalho Chehab 				return SENSOR_OV7670;
30460c0d06caSMauro Carvalho Chehab 			case 0x8243:
30470c0d06caSMauro Carvalho Chehab 				return SENSOR_MI0360;
30480c0d06caSMauro Carvalho Chehab 			}
30490c0d06caSMauro Carvalho Chehab 		}
30500c0d06caSMauro Carvalho Chehab 		ptsensor_info++;
30510c0d06caSMauro Carvalho Chehab 	}
30520c0d06caSMauro Carvalho Chehab 	return -1;
30530c0d06caSMauro Carvalho Chehab }
30540c0d06caSMauro Carvalho Chehab 
i2c_write(struct gspca_dev * gspca_dev,u8 reg,const u8 * val,u8 size)30550c0d06caSMauro Carvalho Chehab static void i2c_write(struct gspca_dev *gspca_dev,
30560c0d06caSMauro Carvalho Chehab 			u8 reg, const u8 *val,
30570c0d06caSMauro Carvalho Chehab 			u8 size)		/* 1 or 2 */
30580c0d06caSMauro Carvalho Chehab {
30590c0d06caSMauro Carvalho Chehab 	int retry;
30600c0d06caSMauro Carvalho Chehab 
30610c0d06caSMauro Carvalho Chehab 	if (gspca_dev->usb_err < 0)
30620c0d06caSMauro Carvalho Chehab 		return;
30630c0d06caSMauro Carvalho Chehab 	if (size == 1)
306437d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_USBO, "i2c_w %02x %02x\n", reg, *val);
30650c0d06caSMauro Carvalho Chehab 	else
306637d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_USBO, "i2c_w %02x %02x%02x\n",
306737d5efb0SJoe Perches 			  reg, *val, val[1]);
30680c0d06caSMauro Carvalho Chehab 	reg_r_i(gspca_dev, 0xa1, 0xb33f, 1);
30690c0d06caSMauro Carvalho Chehab /*fixme:should check if (!(gspca_dev->usb_buf[0] & 0x02)) error*/
30700c0d06caSMauro Carvalho Chehab 	reg_w_i(gspca_dev, 0xa0, size, 0xb334);
30710c0d06caSMauro Carvalho Chehab 	reg_w_i(gspca_dev, 0xa0, reg, 0xb33a);
30720c0d06caSMauro Carvalho Chehab 	reg_w_i(gspca_dev, 0xa0, val[0], 0xb336);
30730c0d06caSMauro Carvalho Chehab 	if (size > 1)
30740c0d06caSMauro Carvalho Chehab 		reg_w_i(gspca_dev, 0xa0, val[1], 0xb337);
30750c0d06caSMauro Carvalho Chehab 	reg_w_i(gspca_dev, 0xa0, 0x01, 0xb339);
30760c0d06caSMauro Carvalho Chehab 	retry = 4;
30770c0d06caSMauro Carvalho Chehab 	do {
30780c0d06caSMauro Carvalho Chehab 		reg_r_i(gspca_dev, 0xa1, 0xb33b, 1);
30790c0d06caSMauro Carvalho Chehab 		if (gspca_dev->usb_buf[0] == 0)
30800c0d06caSMauro Carvalho Chehab 			break;
30810c0d06caSMauro Carvalho Chehab 		msleep(20);
30820c0d06caSMauro Carvalho Chehab 	} while (--retry > 0);
30830c0d06caSMauro Carvalho Chehab 	if (retry <= 0)
30840c0d06caSMauro Carvalho Chehab 		pr_err("i2c_write timeout\n");
30850c0d06caSMauro Carvalho Chehab }
30860c0d06caSMauro Carvalho Chehab 
put_tab_to_reg(struct gspca_dev * gspca_dev,const u8 * tab,u8 tabsize,u16 addr)30870c0d06caSMauro Carvalho Chehab static void put_tab_to_reg(struct gspca_dev *gspca_dev,
30880c0d06caSMauro Carvalho Chehab 			const u8 *tab, u8 tabsize, u16 addr)
30890c0d06caSMauro Carvalho Chehab {
30900c0d06caSMauro Carvalho Chehab 	int j;
30910c0d06caSMauro Carvalho Chehab 	u16 ad = addr;
30920c0d06caSMauro Carvalho Chehab 
30930c0d06caSMauro Carvalho Chehab 	for (j = 0; j < tabsize; j++)
30940c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, tab[j], ad++);
30950c0d06caSMauro Carvalho Chehab }
30960c0d06caSMauro Carvalho Chehab 
usb_exchange(struct gspca_dev * gspca_dev,const u8 data[][4])30970c0d06caSMauro Carvalho Chehab static void usb_exchange(struct gspca_dev *gspca_dev,
30980c0d06caSMauro Carvalho Chehab 			const u8 data[][4])
30990c0d06caSMauro Carvalho Chehab {
31000c0d06caSMauro Carvalho Chehab 	int i = 0;
31010c0d06caSMauro Carvalho Chehab 
31020c0d06caSMauro Carvalho Chehab 	for (;;) {
31030c0d06caSMauro Carvalho Chehab 		switch (data[i][3]) {
31040c0d06caSMauro Carvalho Chehab 		default:
31050c0d06caSMauro Carvalho Chehab 			return;
31060c0d06caSMauro Carvalho Chehab 		case 0xcc:			/* normal write */
31070c0d06caSMauro Carvalho Chehab 			reg_w(gspca_dev, 0xa0, data[i][2],
31080c0d06caSMauro Carvalho Chehab 					(data[i][0]) << 8 | data[i][1]);
31090c0d06caSMauro Carvalho Chehab 			break;
31100c0d06caSMauro Carvalho Chehab 		case 0xaa:			/* i2c op */
31110c0d06caSMauro Carvalho Chehab 			i2c_write(gspca_dev, data[i][1], &data[i][2], 1);
31120c0d06caSMauro Carvalho Chehab 			break;
31130c0d06caSMauro Carvalho Chehab 		case 0xbb:			/* i2c op */
31140c0d06caSMauro Carvalho Chehab 			i2c_write(gspca_dev, data[i][0], &data[i][1], 2);
31150c0d06caSMauro Carvalho Chehab 			break;
31160c0d06caSMauro Carvalho Chehab 		case 0xdd:
31170c0d06caSMauro Carvalho Chehab 			msleep(data[i][1] * 256 + data[i][2] + 10);
31180c0d06caSMauro Carvalho Chehab 			break;
31190c0d06caSMauro Carvalho Chehab 		}
31200c0d06caSMauro Carvalho Chehab 		i++;
31210c0d06caSMauro Carvalho Chehab 	}
31220c0d06caSMauro Carvalho Chehab 	/*not reached*/
31230c0d06caSMauro Carvalho Chehab }
31240c0d06caSMauro Carvalho Chehab 
31250c0d06caSMauro Carvalho Chehab 
31260c0d06caSMauro Carvalho Chehab /* this function is called at probe time */
sd_config(struct gspca_dev * gspca_dev,const struct usb_device_id * id)31270c0d06caSMauro Carvalho Chehab static int sd_config(struct gspca_dev *gspca_dev,
31280c0d06caSMauro Carvalho Chehab 			const struct usb_device_id *id)
31290c0d06caSMauro Carvalho Chehab {
31300c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *) gspca_dev;
31310c0d06caSMauro Carvalho Chehab 
31320c0d06caSMauro Carvalho Chehab 	sd->bridge = id->driver_info >> 8;
31330c0d06caSMauro Carvalho Chehab 	sd->flags = id->driver_info & 0xff;
31340c0d06caSMauro Carvalho Chehab 
31350c0d06caSMauro Carvalho Chehab 	if (id->idVendor == 0x046d &&
31360c0d06caSMauro Carvalho Chehab 	    (id->idProduct == 0x0892 || id->idProduct == 0x0896))
31370c0d06caSMauro Carvalho Chehab 		sd->sensor = SENSOR_POxxxx;	/* no probe */
31380c0d06caSMauro Carvalho Chehab 
31390c0d06caSMauro Carvalho Chehab 	return 0;
31400c0d06caSMauro Carvalho Chehab }
31410c0d06caSMauro Carvalho Chehab 
31420c0d06caSMauro Carvalho Chehab /* this function is called at probe and resume time */
sd_init(struct gspca_dev * gspca_dev)31430c0d06caSMauro Carvalho Chehab static int sd_init(struct gspca_dev *gspca_dev)
31440c0d06caSMauro Carvalho Chehab {
31450c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *) gspca_dev;
31460c0d06caSMauro Carvalho Chehab 	struct cam *cam;
31470c0d06caSMauro Carvalho Chehab 	int sensor;
31480c0d06caSMauro Carvalho Chehab 	/* number of packets per ISOC message */
31490c0d06caSMauro Carvalho Chehab 	static u8 npkt[NSENSORS] = {
31500c0d06caSMauro Carvalho Chehab 		[SENSOR_HV7131R] =	64,
31510c0d06caSMauro Carvalho Chehab 		[SENSOR_MI0360] =	32,
31520c0d06caSMauro Carvalho Chehab 		[SENSOR_MI1310_SOC] =	32,
31530c0d06caSMauro Carvalho Chehab 		[SENSOR_MI1320] =	64,
31540c0d06caSMauro Carvalho Chehab 		[SENSOR_MI1320_SOC] =	128,
31550c0d06caSMauro Carvalho Chehab 		[SENSOR_OV7660] =	32,
31560c0d06caSMauro Carvalho Chehab 		[SENSOR_OV7670] =	64,
31570c0d06caSMauro Carvalho Chehab 		[SENSOR_PO1200] =	128,
31580c0d06caSMauro Carvalho Chehab 		[SENSOR_PO3130NC] =	128,
31590c0d06caSMauro Carvalho Chehab 		[SENSOR_POxxxx] =	128,
31600c0d06caSMauro Carvalho Chehab 	};
31610c0d06caSMauro Carvalho Chehab 
31620c0d06caSMauro Carvalho Chehab 	if (sd->sensor != SENSOR_POxxxx)
31630c0d06caSMauro Carvalho Chehab 		sensor = vc032x_probe_sensor(gspca_dev);
31640c0d06caSMauro Carvalho Chehab 	else
31650c0d06caSMauro Carvalho Chehab 		sensor = sd->sensor;
31660c0d06caSMauro Carvalho Chehab 
31670c0d06caSMauro Carvalho Chehab 	switch (sensor) {
31680c0d06caSMauro Carvalho Chehab 	case -1:
31690c0d06caSMauro Carvalho Chehab 		pr_err("Unknown sensor...\n");
31700c0d06caSMauro Carvalho Chehab 		return -EINVAL;
31710c0d06caSMauro Carvalho Chehab 	case SENSOR_HV7131R:
317237d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Find Sensor HV7131R\n");
31730c0d06caSMauro Carvalho Chehab 		break;
31740c0d06caSMauro Carvalho Chehab 	case SENSOR_MI0360:
317537d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Find Sensor MI0360\n");
31760c0d06caSMauro Carvalho Chehab 		sd->bridge = BRIDGE_VC0323;
31770c0d06caSMauro Carvalho Chehab 		break;
31780c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1310_SOC:
317937d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Find Sensor MI1310_SOC\n");
31800c0d06caSMauro Carvalho Chehab 		break;
31810c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1320:
318237d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Find Sensor MI1320\n");
31830c0d06caSMauro Carvalho Chehab 		break;
31840c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1320_SOC:
318537d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Find Sensor MI1320_SOC\n");
31860c0d06caSMauro Carvalho Chehab 		break;
31870c0d06caSMauro Carvalho Chehab 	case SENSOR_OV7660:
318837d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Find Sensor OV7660\n");
31890c0d06caSMauro Carvalho Chehab 		break;
31900c0d06caSMauro Carvalho Chehab 	case SENSOR_OV7670:
319137d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Find Sensor OV7670\n");
31920c0d06caSMauro Carvalho Chehab 		break;
31930c0d06caSMauro Carvalho Chehab 	case SENSOR_PO1200:
319437d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Find Sensor PO1200\n");
31950c0d06caSMauro Carvalho Chehab 		break;
31960c0d06caSMauro Carvalho Chehab 	case SENSOR_PO3130NC:
319737d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Find Sensor PO3130NC\n");
31980c0d06caSMauro Carvalho Chehab 		break;
31990c0d06caSMauro Carvalho Chehab 	case SENSOR_POxxxx:
320037d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PROBE, "Sensor POxxxx\n");
32010c0d06caSMauro Carvalho Chehab 		break;
32020c0d06caSMauro Carvalho Chehab 	}
32030c0d06caSMauro Carvalho Chehab 	sd->sensor = sensor;
32040c0d06caSMauro Carvalho Chehab 
32050c0d06caSMauro Carvalho Chehab 	cam = &gspca_dev->cam;
32060c0d06caSMauro Carvalho Chehab 	if (sd->bridge == BRIDGE_VC0321) {
32070c0d06caSMauro Carvalho Chehab 		cam->cam_mode = vc0321_mode;
32080c0d06caSMauro Carvalho Chehab 		cam->nmodes = ARRAY_SIZE(vc0321_mode);
32090c0d06caSMauro Carvalho Chehab 	} else {
32100c0d06caSMauro Carvalho Chehab 		switch (sensor) {
32110c0d06caSMauro Carvalho Chehab 		case SENSOR_PO1200:
32120c0d06caSMauro Carvalho Chehab 			cam->cam_mode = svga_mode;
32130c0d06caSMauro Carvalho Chehab 			cam->nmodes = ARRAY_SIZE(svga_mode);
32140c0d06caSMauro Carvalho Chehab 			break;
32150c0d06caSMauro Carvalho Chehab 		case SENSOR_MI1310_SOC:
32160c0d06caSMauro Carvalho Chehab 			cam->cam_mode = vc0323_mode;
32170c0d06caSMauro Carvalho Chehab 			cam->nmodes = ARRAY_SIZE(vc0323_mode);
32180c0d06caSMauro Carvalho Chehab 			break;
32190c0d06caSMauro Carvalho Chehab 		case SENSOR_MI1320_SOC:
32200c0d06caSMauro Carvalho Chehab 			cam->cam_mode = bi_mode;
32210c0d06caSMauro Carvalho Chehab 			cam->nmodes = ARRAY_SIZE(bi_mode);
32220c0d06caSMauro Carvalho Chehab 			break;
32230c0d06caSMauro Carvalho Chehab 		case SENSOR_OV7670:
32240c0d06caSMauro Carvalho Chehab 			cam->cam_mode = bi_mode;
32250c0d06caSMauro Carvalho Chehab 			cam->nmodes = ARRAY_SIZE(bi_mode) - 1;
32260c0d06caSMauro Carvalho Chehab 			break;
32270c0d06caSMauro Carvalho Chehab 		default:
32280c0d06caSMauro Carvalho Chehab 			cam->cam_mode = vc0323_mode;
32290c0d06caSMauro Carvalho Chehab 			cam->nmodes = ARRAY_SIZE(vc0323_mode) - 1;
32300c0d06caSMauro Carvalho Chehab 			break;
32310c0d06caSMauro Carvalho Chehab 		}
32320c0d06caSMauro Carvalho Chehab 	}
32330c0d06caSMauro Carvalho Chehab 	cam->npkt = npkt[sd->sensor];
32340c0d06caSMauro Carvalho Chehab 
32350c0d06caSMauro Carvalho Chehab 	if (sd->sensor == SENSOR_OV7670)
32360c0d06caSMauro Carvalho Chehab 		sd->flags |= FL_HFLIP | FL_VFLIP;
32370c0d06caSMauro Carvalho Chehab 
32380c0d06caSMauro Carvalho Chehab 	if (sd->bridge == BRIDGE_VC0321) {
32390c0d06caSMauro Carvalho Chehab 		reg_r(gspca_dev, 0x8a, 0, 3);
32400c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0x87, 0x00, 0x0f0f);
32410c0d06caSMauro Carvalho Chehab 		reg_r(gspca_dev, 0x8b, 0, 3);
32420c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0x88, 0x00, 0x0202);
32430c0d06caSMauro Carvalho Chehab 		if (sd->sensor == SENSOR_POxxxx) {
32440c0d06caSMauro Carvalho Chehab 			reg_r(gspca_dev, 0xa1, 0xb300, 1);
32450c0d06caSMauro Carvalho Chehab 			if (gspca_dev->usb_buf[0] != 0) {
32460c0d06caSMauro Carvalho Chehab 				reg_w(gspca_dev, 0xa0, 0x26, 0xb300);
32470c0d06caSMauro Carvalho Chehab 				reg_w(gspca_dev, 0xa0, 0x04, 0xb300);
32480c0d06caSMauro Carvalho Chehab 			}
32490c0d06caSMauro Carvalho Chehab 			reg_w(gspca_dev, 0xa0, 0x00, 0xb300);
32500c0d06caSMauro Carvalho Chehab 		}
32510c0d06caSMauro Carvalho Chehab 	}
32520c0d06caSMauro Carvalho Chehab 	return gspca_dev->usb_err;
32530c0d06caSMauro Carvalho Chehab }
32540c0d06caSMauro Carvalho Chehab 
setbrightness(struct gspca_dev * gspca_dev,s32 val)32550c0d06caSMauro Carvalho Chehab static void setbrightness(struct gspca_dev *gspca_dev, s32 val)
32560c0d06caSMauro Carvalho Chehab {
32570c0d06caSMauro Carvalho Chehab 	u8 data;
32580c0d06caSMauro Carvalho Chehab 
32590c0d06caSMauro Carvalho Chehab 	data = val;
32600c0d06caSMauro Carvalho Chehab 	if (data >= 0x80)
32610c0d06caSMauro Carvalho Chehab 		data &= 0x7f;
32620c0d06caSMauro Carvalho Chehab 	else
32630c0d06caSMauro Carvalho Chehab 		data = 0xff ^ data;
32640c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0x98, &data, 1);
32650c0d06caSMauro Carvalho Chehab }
32660c0d06caSMauro Carvalho Chehab 
setcontrast(struct gspca_dev * gspca_dev,u8 val)32670c0d06caSMauro Carvalho Chehab static void setcontrast(struct gspca_dev *gspca_dev, u8 val)
32680c0d06caSMauro Carvalho Chehab {
32690c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0x99, &val, 1);
32700c0d06caSMauro Carvalho Chehab }
32710c0d06caSMauro Carvalho Chehab 
setcolors(struct gspca_dev * gspca_dev,u8 val)32720c0d06caSMauro Carvalho Chehab static void setcolors(struct gspca_dev *gspca_dev, u8 val)
32730c0d06caSMauro Carvalho Chehab {
32740c0d06caSMauro Carvalho Chehab 	u8 data;
32750c0d06caSMauro Carvalho Chehab 
32760c0d06caSMauro Carvalho Chehab 	data = val - (val >> 3) - 1;
32770c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0x94, &data, 1);
32780c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0x95, &val, 1);
32790c0d06caSMauro Carvalho Chehab }
32800c0d06caSMauro Carvalho Chehab 
sethvflip(struct gspca_dev * gspca_dev,bool hflip,bool vflip)32810c0d06caSMauro Carvalho Chehab static void sethvflip(struct gspca_dev *gspca_dev, bool hflip, bool vflip)
32820c0d06caSMauro Carvalho Chehab {
32830c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *) gspca_dev;
32840c0d06caSMauro Carvalho Chehab 	u8 data[2];
32850c0d06caSMauro Carvalho Chehab 
32860c0d06caSMauro Carvalho Chehab 	if (sd->flags & FL_HFLIP)
32870c0d06caSMauro Carvalho Chehab 		hflip = !hflip;
32880c0d06caSMauro Carvalho Chehab 	if (sd->flags & FL_VFLIP)
32890c0d06caSMauro Carvalho Chehab 		vflip = !vflip;
32900c0d06caSMauro Carvalho Chehab 	switch (sd->sensor) {
32910c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1310_SOC:
32920c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1320:
32930c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1320_SOC:
32940c0d06caSMauro Carvalho Chehab 		data[0] = data[1] = 0;		/* select page 0 */
32950c0d06caSMauro Carvalho Chehab 		i2c_write(gspca_dev, 0xf0, data, 2);
32960c0d06caSMauro Carvalho Chehab 		data[0] = sd->sensor == SENSOR_MI1310_SOC ? 0x03 : 0x01;
32970c0d06caSMauro Carvalho Chehab 		data[1] = 0x02 * hflip
32980c0d06caSMauro Carvalho Chehab 			| 0x01 * vflip;
32990c0d06caSMauro Carvalho Chehab 		i2c_write(gspca_dev, 0x20, data, 2);
33000c0d06caSMauro Carvalho Chehab 		break;
33010c0d06caSMauro Carvalho Chehab 	case SENSOR_OV7660:
33020c0d06caSMauro Carvalho Chehab 	case SENSOR_OV7670:
33030c0d06caSMauro Carvalho Chehab 		data[0] = sd->sensor == SENSOR_OV7660 ? 0x01 : 0x07;
33040c0d06caSMauro Carvalho Chehab 		data[0] |= OV7660_MVFP_MIRROR * hflip
33050c0d06caSMauro Carvalho Chehab 			| OV7660_MVFP_VFLIP * vflip;
33060c0d06caSMauro Carvalho Chehab 		i2c_write(gspca_dev, OV7660_REG_MVFP, data, 1);
33070c0d06caSMauro Carvalho Chehab 		break;
33080c0d06caSMauro Carvalho Chehab 	case SENSOR_PO1200:
33090c0d06caSMauro Carvalho Chehab 		data[0] = 0;
33100c0d06caSMauro Carvalho Chehab 		i2c_write(gspca_dev, 0x03, data, 1);
33110c0d06caSMauro Carvalho Chehab 		data[0] = 0x80 * hflip
33120c0d06caSMauro Carvalho Chehab 			| 0x40 * vflip
33130c0d06caSMauro Carvalho Chehab 			| 0x06;
33140c0d06caSMauro Carvalho Chehab 		i2c_write(gspca_dev, 0x1e, data, 1);
33150c0d06caSMauro Carvalho Chehab 		break;
33160c0d06caSMauro Carvalho Chehab 	}
33170c0d06caSMauro Carvalho Chehab }
33180c0d06caSMauro Carvalho Chehab 
setlightfreq(struct gspca_dev * gspca_dev,s32 val)33190c0d06caSMauro Carvalho Chehab static void setlightfreq(struct gspca_dev *gspca_dev, s32 val)
33200c0d06caSMauro Carvalho Chehab {
33210c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *) gspca_dev;
3322*9a582884SHerman 	static const u8 (*ov7660_freq_tb[3])[4] = {
3323*9a582884SHerman 		ov7660_NoFlicker, ov7660_50HZ, ov7660_60HZ};
33240c0d06caSMauro Carvalho Chehab 
33250c0d06caSMauro Carvalho Chehab 	if (sd->sensor != SENSOR_OV7660)
33260c0d06caSMauro Carvalho Chehab 		return;
33270c0d06caSMauro Carvalho Chehab 	usb_exchange(gspca_dev, ov7660_freq_tb[val]);
33280c0d06caSMauro Carvalho Chehab }
33290c0d06caSMauro Carvalho Chehab 
setsharpness(struct gspca_dev * gspca_dev,s32 val)33300c0d06caSMauro Carvalho Chehab static void setsharpness(struct gspca_dev *gspca_dev, s32 val)
33310c0d06caSMauro Carvalho Chehab {
33320c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *) gspca_dev;
33330c0d06caSMauro Carvalho Chehab 	u8 data;
33340c0d06caSMauro Carvalho Chehab 
33350c0d06caSMauro Carvalho Chehab 	switch (sd->sensor) {
33360c0d06caSMauro Carvalho Chehab 	case SENSOR_PO1200:
33370c0d06caSMauro Carvalho Chehab 		data = 0;
33380c0d06caSMauro Carvalho Chehab 		i2c_write(gspca_dev, 0x03, &data, 1);
33390c0d06caSMauro Carvalho Chehab 		if (val < 0)
33400c0d06caSMauro Carvalho Chehab 			data = 0x6a;
33410c0d06caSMauro Carvalho Chehab 		else
33420c0d06caSMauro Carvalho Chehab 			data = 0xb5 + val * 3;
33430c0d06caSMauro Carvalho Chehab 		i2c_write(gspca_dev, 0x61, &data, 1);
33440c0d06caSMauro Carvalho Chehab 		break;
33450c0d06caSMauro Carvalho Chehab 	case SENSOR_POxxxx:
33460c0d06caSMauro Carvalho Chehab 		if (val < 0)
33470c0d06caSMauro Carvalho Chehab 			data = 0x7e;	/* def = max */
33480c0d06caSMauro Carvalho Chehab 		else
33490c0d06caSMauro Carvalho Chehab 			data = 0x60 + val * 0x0f;
33500c0d06caSMauro Carvalho Chehab 		i2c_write(gspca_dev, 0x59, &data, 1);
33510c0d06caSMauro Carvalho Chehab 		break;
33520c0d06caSMauro Carvalho Chehab 	}
33530c0d06caSMauro Carvalho Chehab }
setgain(struct gspca_dev * gspca_dev,u8 val)33540c0d06caSMauro Carvalho Chehab static void setgain(struct gspca_dev *gspca_dev, u8 val)
33550c0d06caSMauro Carvalho Chehab {
33560c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0x15, &val, 1);
33570c0d06caSMauro Carvalho Chehab }
33580c0d06caSMauro Carvalho Chehab 
setexposure(struct gspca_dev * gspca_dev,s32 val)33590c0d06caSMauro Carvalho Chehab static void setexposure(struct gspca_dev *gspca_dev, s32 val)
33600c0d06caSMauro Carvalho Chehab {
33610c0d06caSMauro Carvalho Chehab 	u8 data;
33620c0d06caSMauro Carvalho Chehab 
33630c0d06caSMauro Carvalho Chehab 	data = val >> 8;
33640c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0x1a, &data, 1);
33650c0d06caSMauro Carvalho Chehab 	data = val;
33660c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0x1b, &data, 1);
33670c0d06caSMauro Carvalho Chehab }
33680c0d06caSMauro Carvalho Chehab 
setautogain(struct gspca_dev * gspca_dev,s32 val)33690c0d06caSMauro Carvalho Chehab static void setautogain(struct gspca_dev *gspca_dev, s32 val)
33700c0d06caSMauro Carvalho Chehab {
33710c0d06caSMauro Carvalho Chehab 	static const u8 data[2] = {0x28, 0x3c};
33720c0d06caSMauro Carvalho Chehab 
33730c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0xd1, &data[val], 1);
33740c0d06caSMauro Carvalho Chehab }
33750c0d06caSMauro Carvalho Chehab 
setgamma(struct gspca_dev * gspca_dev)33760c0d06caSMauro Carvalho Chehab static void setgamma(struct gspca_dev *gspca_dev)
33770c0d06caSMauro Carvalho Chehab {
33780c0d06caSMauro Carvalho Chehab /*fixme:to do */
33790c0d06caSMauro Carvalho Chehab 	usb_exchange(gspca_dev, poxxxx_gamma);
33800c0d06caSMauro Carvalho Chehab }
33810c0d06caSMauro Carvalho Chehab 
setbacklight(struct gspca_dev * gspca_dev,s32 val)33820c0d06caSMauro Carvalho Chehab static void setbacklight(struct gspca_dev *gspca_dev, s32 val)
33830c0d06caSMauro Carvalho Chehab {
33840c0d06caSMauro Carvalho Chehab 	u16 v;
33850c0d06caSMauro Carvalho Chehab 	u8 data;
33860c0d06caSMauro Carvalho Chehab 
33870c0d06caSMauro Carvalho Chehab 	data = (val << 4) | 0x0f;
33880c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0xaa, &data, 1);
33890c0d06caSMauro Carvalho Chehab 	v = 613 + 12 * val;
33900c0d06caSMauro Carvalho Chehab 	data = v >> 8;
33910c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0xc4, &data, 1);
33920c0d06caSMauro Carvalho Chehab 	data = v;
33930c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0xc5, &data, 1);
33940c0d06caSMauro Carvalho Chehab 	v = 1093 - 12 * val;
33950c0d06caSMauro Carvalho Chehab 	data = v >> 8;
33960c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0xc6, &data, 1);
33970c0d06caSMauro Carvalho Chehab 	data = v;
33980c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0xc7, &data, 1);
33990c0d06caSMauro Carvalho Chehab 	v = 342 + 9 * val;
34000c0d06caSMauro Carvalho Chehab 	data = v >> 8;
34010c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0xc8, &data, 1);
34020c0d06caSMauro Carvalho Chehab 	data = v;
34030c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0xc9, &data, 1);
34040c0d06caSMauro Carvalho Chehab 	v = 702 - 9 * val;
34050c0d06caSMauro Carvalho Chehab 	data = v >> 8;
34060c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0xca, &data, 1);
34070c0d06caSMauro Carvalho Chehab 	data = v;
34080c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0xcb, &data, 1);
34090c0d06caSMauro Carvalho Chehab }
34100c0d06caSMauro Carvalho Chehab 
setwb(struct gspca_dev * gspca_dev)34110c0d06caSMauro Carvalho Chehab static void setwb(struct gspca_dev *gspca_dev)
34120c0d06caSMauro Carvalho Chehab {
34130c0d06caSMauro Carvalho Chehab /*fixme:to do - valid when reg d1 = 0x1c - (reg16 + reg15 = 0xa3)*/
34140c0d06caSMauro Carvalho Chehab 	static const u8 data[2] = {0x00, 0x00};
34150c0d06caSMauro Carvalho Chehab 
34160c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0x16, &data[0], 1);
34170c0d06caSMauro Carvalho Chehab 	i2c_write(gspca_dev, 0x18, &data[1], 1);
34180c0d06caSMauro Carvalho Chehab }
34190c0d06caSMauro Carvalho Chehab 
sd_start(struct gspca_dev * gspca_dev)34200c0d06caSMauro Carvalho Chehab static int sd_start(struct gspca_dev *gspca_dev)
34210c0d06caSMauro Carvalho Chehab {
34220c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *) gspca_dev;
34230c0d06caSMauro Carvalho Chehab 	const u8 (*init)[4];
34240c0d06caSMauro Carvalho Chehab 	const u8 *GammaT = NULL;
34250c0d06caSMauro Carvalho Chehab 	const u8 *MatrixT = NULL;
34260c0d06caSMauro Carvalho Chehab 	int mode;
34270c0d06caSMauro Carvalho Chehab 	static const u8 (*mi1320_soc_init[])[4] = {
34280c0d06caSMauro Carvalho Chehab 		mi1320_soc_InitSXGA,
34290c0d06caSMauro Carvalho Chehab 		mi1320_soc_InitVGA,
34300c0d06caSMauro Carvalho Chehab 		mi1320_soc_InitQVGA,
34310c0d06caSMauro Carvalho Chehab 	};
34320c0d06caSMauro Carvalho Chehab 
34330c0d06caSMauro Carvalho Chehab /*fixme: back sensor only*/
34340c0d06caSMauro Carvalho Chehab 	if (sd->flags & FL_SAMSUNG) {
34350c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0x89, 0xf0ff, 0xffff);
34360c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa9, 0x8348, 0x000e);
34370c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa9, 0x0000, 0x001a);
34380c0d06caSMauro Carvalho Chehab 	}
34390c0d06caSMauro Carvalho Chehab 
34400c0d06caSMauro Carvalho Chehab 	/* Assume start use the good resolution from gspca_dev->mode */
34410c0d06caSMauro Carvalho Chehab 	if (sd->bridge == BRIDGE_VC0321) {
34420c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0xff, 0xbfec);
34430c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0xff, 0xbfed);
34440c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0xff, 0xbfee);
34450c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0xff, 0xbfef);
34460c0d06caSMauro Carvalho Chehab 		sd->image_offset = 46;
34470c0d06caSMauro Carvalho Chehab 	} else {
34480c0d06caSMauro Carvalho Chehab 		if (gspca_dev->cam.cam_mode[gspca_dev->curr_mode].pixelformat
34490c0d06caSMauro Carvalho Chehab 				== V4L2_PIX_FMT_JPEG)
34500c0d06caSMauro Carvalho Chehab 			sd->image_offset = 0;
34510c0d06caSMauro Carvalho Chehab 		else
34520c0d06caSMauro Carvalho Chehab 			sd->image_offset = 32;
34530c0d06caSMauro Carvalho Chehab 	}
34540c0d06caSMauro Carvalho Chehab 
34550c0d06caSMauro Carvalho Chehab 	mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
34560c0d06caSMauro Carvalho Chehab 	switch (sd->sensor) {
34570c0d06caSMauro Carvalho Chehab 	case SENSOR_HV7131R:
34580c0d06caSMauro Carvalho Chehab 		GammaT = hv7131r_gamma;
34590c0d06caSMauro Carvalho Chehab 		MatrixT = hv7131r_matrix;
34600c0d06caSMauro Carvalho Chehab 		if (mode)
34610c0d06caSMauro Carvalho Chehab 			init = hv7131r_initQVGA_data;	/* 320x240 */
34620c0d06caSMauro Carvalho Chehab 		else
34630c0d06caSMauro Carvalho Chehab 			init = hv7131r_initVGA_data;	/* 640x480 */
34640c0d06caSMauro Carvalho Chehab 		break;
34650c0d06caSMauro Carvalho Chehab 	case SENSOR_OV7660:
34660c0d06caSMauro Carvalho Chehab 		GammaT = ov7660_gamma;
34670c0d06caSMauro Carvalho Chehab 		MatrixT = ov7660_matrix;
34680c0d06caSMauro Carvalho Chehab 		if (mode)
34690c0d06caSMauro Carvalho Chehab 			init = ov7660_initQVGA_data;	/* 320x240 */
34700c0d06caSMauro Carvalho Chehab 		else
34710c0d06caSMauro Carvalho Chehab 			init = ov7660_initVGA_data;	/* 640x480 */
34720c0d06caSMauro Carvalho Chehab 		break;
34730c0d06caSMauro Carvalho Chehab 	case SENSOR_MI0360:
34740c0d06caSMauro Carvalho Chehab 		GammaT = mi1320_gamma;
34750c0d06caSMauro Carvalho Chehab 		MatrixT = mi0360_matrix;
34760c0d06caSMauro Carvalho Chehab 		if (mode)
34770c0d06caSMauro Carvalho Chehab 			init = mi0360_initQVGA_JPG;	/* 320x240 */
34780c0d06caSMauro Carvalho Chehab 		else
34790c0d06caSMauro Carvalho Chehab 			init = mi0360_initVGA_JPG;	/* 640x480 */
34800c0d06caSMauro Carvalho Chehab 		break;
34810c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1310_SOC:
34820c0d06caSMauro Carvalho Chehab 		GammaT = mi1320_gamma;
34830c0d06caSMauro Carvalho Chehab 		MatrixT = mi1320_matrix;
34840c0d06caSMauro Carvalho Chehab 		switch (mode) {
34850c0d06caSMauro Carvalho Chehab 		case 1:
34860c0d06caSMauro Carvalho Chehab 			init = mi1310_socinitQVGA_JPG;	/* 320x240 */
34870c0d06caSMauro Carvalho Chehab 			break;
34880c0d06caSMauro Carvalho Chehab 		case 0:
34890c0d06caSMauro Carvalho Chehab 			init = mi1310_socinitVGA_JPG;	/* 640x480 */
34900c0d06caSMauro Carvalho Chehab 			break;
34910c0d06caSMauro Carvalho Chehab 		default:
34920c0d06caSMauro Carvalho Chehab 			init = mi1310_soc_InitSXGA_JPG;	/* 1280x1024 */
34930c0d06caSMauro Carvalho Chehab 			break;
34940c0d06caSMauro Carvalho Chehab 		}
34950c0d06caSMauro Carvalho Chehab 		break;
34960c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1320:
34970c0d06caSMauro Carvalho Chehab 		GammaT = mi1320_gamma;
34980c0d06caSMauro Carvalho Chehab 		MatrixT = mi1320_matrix;
34990c0d06caSMauro Carvalho Chehab 		if (mode)
35000c0d06caSMauro Carvalho Chehab 			init = mi1320_initQVGA_data;	/* 320x240 */
35010c0d06caSMauro Carvalho Chehab 		else
35020c0d06caSMauro Carvalho Chehab 			init = mi1320_initVGA_data;	/* 640x480 */
35030c0d06caSMauro Carvalho Chehab 		break;
35040c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1320_SOC:
35050c0d06caSMauro Carvalho Chehab 		GammaT = mi1320_gamma;
35060c0d06caSMauro Carvalho Chehab 		MatrixT = mi1320_matrix;
35070c0d06caSMauro Carvalho Chehab 		init = mi1320_soc_init[mode];
35080c0d06caSMauro Carvalho Chehab 		break;
35090c0d06caSMauro Carvalho Chehab 	case SENSOR_OV7670:
35100c0d06caSMauro Carvalho Chehab 		init = mode == 1 ? ov7670_InitVGA : ov7670_InitQVGA;
35110c0d06caSMauro Carvalho Chehab 		break;
35120c0d06caSMauro Carvalho Chehab 	case SENSOR_PO3130NC:
35130c0d06caSMauro Carvalho Chehab 		GammaT = po3130_gamma;
35140c0d06caSMauro Carvalho Chehab 		MatrixT = po3130_matrix;
35150c0d06caSMauro Carvalho Chehab 		if (mode)
35160c0d06caSMauro Carvalho Chehab 			init = po3130_initQVGA_data;	/* 320x240 */
35170c0d06caSMauro Carvalho Chehab 		else
35180c0d06caSMauro Carvalho Chehab 			init = po3130_initVGA_data;	/* 640x480 */
35190c0d06caSMauro Carvalho Chehab 		usb_exchange(gspca_dev, init);
35200c0d06caSMauro Carvalho Chehab 		init = po3130_rundata;
35210c0d06caSMauro Carvalho Chehab 		break;
35220c0d06caSMauro Carvalho Chehab 	case SENSOR_PO1200:
35230c0d06caSMauro Carvalho Chehab 		GammaT = po1200_gamma;
35240c0d06caSMauro Carvalho Chehab 		MatrixT = po1200_matrix;
35250c0d06caSMauro Carvalho Chehab 		init = po1200_initVGA_data;
35260c0d06caSMauro Carvalho Chehab 		break;
35270c0d06caSMauro Carvalho Chehab 	default:
35280c0d06caSMauro Carvalho Chehab /*	case SENSOR_POxxxx: */
35290c0d06caSMauro Carvalho Chehab 		usb_exchange(gspca_dev, poxxxx_init_common);
35300c0d06caSMauro Carvalho Chehab 		setgamma(gspca_dev);
35310c0d06caSMauro Carvalho Chehab 		usb_exchange(gspca_dev, poxxxx_init_start_3);
35320c0d06caSMauro Carvalho Chehab 		if (mode)
35330c0d06caSMauro Carvalho Chehab 			init = poxxxx_initQVGA;
35340c0d06caSMauro Carvalho Chehab 		else
35350c0d06caSMauro Carvalho Chehab 			init = poxxxx_initVGA;
35360c0d06caSMauro Carvalho Chehab 		usb_exchange(gspca_dev, init);
35370c0d06caSMauro Carvalho Chehab 		reg_r(gspca_dev, 0x8c, 0x0000, 3);
35380c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0,
35390c0d06caSMauro Carvalho Chehab 				gspca_dev->usb_buf[2] & 1 ? 0 : 1,
35400c0d06caSMauro Carvalho Chehab 				0xb35c);
35410c0d06caSMauro Carvalho Chehab 		msleep(300);
35420c0d06caSMauro Carvalho Chehab /*fixme: i2c read 04 and 05*/
35430c0d06caSMauro Carvalho Chehab 		init = poxxxx_init_end_1;
35440c0d06caSMauro Carvalho Chehab 		break;
35450c0d06caSMauro Carvalho Chehab 	}
35460c0d06caSMauro Carvalho Chehab 	usb_exchange(gspca_dev, init);
35470c0d06caSMauro Carvalho Chehab 	if (GammaT && MatrixT) {
35480c0d06caSMauro Carvalho Chehab 		put_tab_to_reg(gspca_dev, GammaT, 17, 0xb84a);
35490c0d06caSMauro Carvalho Chehab 		put_tab_to_reg(gspca_dev, GammaT, 17, 0xb85b);
35500c0d06caSMauro Carvalho Chehab 		put_tab_to_reg(gspca_dev, GammaT, 17, 0xb86c);
35510c0d06caSMauro Carvalho Chehab 		put_tab_to_reg(gspca_dev, MatrixT, 9, 0xb82c);
35520c0d06caSMauro Carvalho Chehab 
35530c0d06caSMauro Carvalho Chehab 		switch (sd->sensor) {
35540c0d06caSMauro Carvalho Chehab 		case SENSOR_PO1200:
35550c0d06caSMauro Carvalho Chehab 		case SENSOR_HV7131R:
35560c0d06caSMauro Carvalho Chehab 			reg_w(gspca_dev, 0x89, 0x0400, 0x1415);
35570c0d06caSMauro Carvalho Chehab 			break;
35580c0d06caSMauro Carvalho Chehab 		case SENSOR_MI1310_SOC:
35590c0d06caSMauro Carvalho Chehab 			reg_w(gspca_dev, 0x89, 0x058c, 0x0000);
35600c0d06caSMauro Carvalho Chehab 			break;
35610c0d06caSMauro Carvalho Chehab 		}
35620c0d06caSMauro Carvalho Chehab 		msleep(100);
35630c0d06caSMauro Carvalho Chehab 	}
35640c0d06caSMauro Carvalho Chehab 	switch (sd->sensor) {
35650c0d06caSMauro Carvalho Chehab 	case SENSOR_OV7670:
35660c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0x87, 0xffff, 0xffff);
35670c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0x88, 0xff00, 0xf0f1);
35680c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0x0000, 0xbfff);
35690c0d06caSMauro Carvalho Chehab 		break;
35700c0d06caSMauro Carvalho Chehab 	case SENSOR_POxxxx:
35710c0d06caSMauro Carvalho Chehab 		usb_exchange(gspca_dev, poxxxx_init_end_2);
35720c0d06caSMauro Carvalho Chehab 		setwb(gspca_dev);
35730c0d06caSMauro Carvalho Chehab 		msleep(80);		/* led on */
35740c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0x89, 0xffff, 0xfdff);
35750c0d06caSMauro Carvalho Chehab 		break;
35760c0d06caSMauro Carvalho Chehab 	}
35770c0d06caSMauro Carvalho Chehab 	return gspca_dev->usb_err;
35780c0d06caSMauro Carvalho Chehab }
35790c0d06caSMauro Carvalho Chehab 
sd_stopN(struct gspca_dev * gspca_dev)35800c0d06caSMauro Carvalho Chehab static void sd_stopN(struct gspca_dev *gspca_dev)
35810c0d06caSMauro Carvalho Chehab {
35820c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *) gspca_dev;
35830c0d06caSMauro Carvalho Chehab 
35840c0d06caSMauro Carvalho Chehab 	switch (sd->sensor) {
35850c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1310_SOC:
35860c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0x89, 0x058c, 0x00ff);
35870c0d06caSMauro Carvalho Chehab 		break;
35880c0d06caSMauro Carvalho Chehab 	case SENSOR_POxxxx:
35890c0d06caSMauro Carvalho Chehab 		return;
35900c0d06caSMauro Carvalho Chehab 	default:
35910c0d06caSMauro Carvalho Chehab 		if (!(sd->flags & FL_SAMSUNG))
35920c0d06caSMauro Carvalho Chehab 			reg_w(gspca_dev, 0x89, 0xffff, 0xffff);
35930c0d06caSMauro Carvalho Chehab 		break;
35940c0d06caSMauro Carvalho Chehab 	}
35950c0d06caSMauro Carvalho Chehab 	reg_w(gspca_dev, 0xa0, 0x01, 0xb301);
35960c0d06caSMauro Carvalho Chehab 	reg_w(gspca_dev, 0xa0, 0x09, 0xb003);
35970c0d06caSMauro Carvalho Chehab }
35980c0d06caSMauro Carvalho Chehab 
35990c0d06caSMauro Carvalho Chehab /* called on streamoff with alt 0 and on disconnect */
sd_stop0(struct gspca_dev * gspca_dev)36000c0d06caSMauro Carvalho Chehab static void sd_stop0(struct gspca_dev *gspca_dev)
36010c0d06caSMauro Carvalho Chehab {
36020c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *) gspca_dev;
36030c0d06caSMauro Carvalho Chehab 
36040c0d06caSMauro Carvalho Chehab 	if (!gspca_dev->present)
36050c0d06caSMauro Carvalho Chehab 		return;
36060c0d06caSMauro Carvalho Chehab /*fixme: is this useful?*/
36070c0d06caSMauro Carvalho Chehab 	if (sd->sensor == SENSOR_MI1310_SOC)
36080c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0x89, 0x058c, 0x00ff);
36090c0d06caSMauro Carvalho Chehab 	else if (!(sd->flags & FL_SAMSUNG))
36100c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0x89, 0xffff, 0xffff);
36110c0d06caSMauro Carvalho Chehab 
36120c0d06caSMauro Carvalho Chehab 	if (sd->sensor == SENSOR_POxxxx) {
36130c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0x26, 0xb300);
36140c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0x04, 0xb300);
36150c0d06caSMauro Carvalho Chehab 		reg_w(gspca_dev, 0xa0, 0x00, 0xb300);
36160c0d06caSMauro Carvalho Chehab 	}
36170c0d06caSMauro Carvalho Chehab }
36180c0d06caSMauro Carvalho Chehab 
sd_pkt_scan(struct gspca_dev * gspca_dev,u8 * data,int len)36190c0d06caSMauro Carvalho Chehab static void sd_pkt_scan(struct gspca_dev *gspca_dev,
36200c0d06caSMauro Carvalho Chehab 			u8 *data,			/* isoc packet */
36210c0d06caSMauro Carvalho Chehab 			int len)			/* iso pkt length */
36220c0d06caSMauro Carvalho Chehab {
36230c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *) gspca_dev;
36240c0d06caSMauro Carvalho Chehab 
36250c0d06caSMauro Carvalho Chehab 	if (data[0] == 0xff && data[1] == 0xd8) {
362637d5efb0SJoe Perches 		gspca_dbg(gspca_dev, D_PACK,
362737d5efb0SJoe Perches 			  "vc032x header packet found len %d\n", len);
36280c0d06caSMauro Carvalho Chehab 		gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0);
36290c0d06caSMauro Carvalho Chehab 		data += sd->image_offset;
36300c0d06caSMauro Carvalho Chehab 		len -= sd->image_offset;
36310c0d06caSMauro Carvalho Chehab 		gspca_frame_add(gspca_dev, FIRST_PACKET, data, len);
36320c0d06caSMauro Carvalho Chehab 		return;
36330c0d06caSMauro Carvalho Chehab 	}
36340c0d06caSMauro Carvalho Chehab 
36350c0d06caSMauro Carvalho Chehab 	/* The vc0321 sends some additional data after sending the complete
36360c0d06caSMauro Carvalho Chehab 	 * frame, we ignore this. */
36370c0d06caSMauro Carvalho Chehab 	if (sd->bridge == BRIDGE_VC0321) {
36380c0d06caSMauro Carvalho Chehab 		int size, l;
36390c0d06caSMauro Carvalho Chehab 
36400c0d06caSMauro Carvalho Chehab 		l = gspca_dev->image_len;
36411f5965c4SHans Verkuil 		size = gspca_dev->pixfmt.sizeimage;
36420c0d06caSMauro Carvalho Chehab 		if (len > size - l)
36430c0d06caSMauro Carvalho Chehab 			len = size - l;
36440c0d06caSMauro Carvalho Chehab 	}
36450c0d06caSMauro Carvalho Chehab 	gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
36460c0d06caSMauro Carvalho Chehab }
36470c0d06caSMauro Carvalho Chehab 
sd_s_ctrl(struct v4l2_ctrl * ctrl)36480c0d06caSMauro Carvalho Chehab static int sd_s_ctrl(struct v4l2_ctrl *ctrl)
36490c0d06caSMauro Carvalho Chehab {
36500c0d06caSMauro Carvalho Chehab 	struct gspca_dev *gspca_dev =
36510c0d06caSMauro Carvalho Chehab 		container_of(ctrl->handler, struct gspca_dev, ctrl_handler);
36520c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *)gspca_dev;
36530c0d06caSMauro Carvalho Chehab 
36540c0d06caSMauro Carvalho Chehab 	gspca_dev->usb_err = 0;
36550c0d06caSMauro Carvalho Chehab 
36560c0d06caSMauro Carvalho Chehab 	if (!gspca_dev->streaming && ctrl->id != V4L2_CID_POWER_LINE_FREQUENCY)
36570c0d06caSMauro Carvalho Chehab 		return 0;
36580c0d06caSMauro Carvalho Chehab 
36590c0d06caSMauro Carvalho Chehab 	switch (ctrl->id) {
36600c0d06caSMauro Carvalho Chehab 	case V4L2_CID_BRIGHTNESS:
36610c0d06caSMauro Carvalho Chehab 		setbrightness(gspca_dev, ctrl->val);
36620c0d06caSMauro Carvalho Chehab 		break;
36630c0d06caSMauro Carvalho Chehab 	case V4L2_CID_CONTRAST:
36640c0d06caSMauro Carvalho Chehab 		setcontrast(gspca_dev, ctrl->val);
36650c0d06caSMauro Carvalho Chehab 		break;
36660c0d06caSMauro Carvalho Chehab 	case V4L2_CID_SATURATION:
36670c0d06caSMauro Carvalho Chehab 		setcolors(gspca_dev, ctrl->val);
36680c0d06caSMauro Carvalho Chehab 		break;
36690c0d06caSMauro Carvalho Chehab 	case V4L2_CID_HFLIP:
36700c0d06caSMauro Carvalho Chehab 		sethvflip(gspca_dev, sd->hflip->val, sd->vflip->val);
36710c0d06caSMauro Carvalho Chehab 		break;
36720c0d06caSMauro Carvalho Chehab 	case V4L2_CID_SHARPNESS:
36730c0d06caSMauro Carvalho Chehab 		setsharpness(gspca_dev, ctrl->val);
36740c0d06caSMauro Carvalho Chehab 		break;
36750c0d06caSMauro Carvalho Chehab 	case V4L2_CID_AUTOGAIN:
36760c0d06caSMauro Carvalho Chehab 		setautogain(gspca_dev, ctrl->val);
36770c0d06caSMauro Carvalho Chehab 		break;
36780c0d06caSMauro Carvalho Chehab 	case V4L2_CID_GAIN:
36790c0d06caSMauro Carvalho Chehab 		setgain(gspca_dev, ctrl->val);
36800c0d06caSMauro Carvalho Chehab 		break;
36810c0d06caSMauro Carvalho Chehab 	case V4L2_CID_EXPOSURE:
36820c0d06caSMauro Carvalho Chehab 		setexposure(gspca_dev, ctrl->val);
36830c0d06caSMauro Carvalho Chehab 		break;
36840c0d06caSMauro Carvalho Chehab 	case V4L2_CID_BACKLIGHT_COMPENSATION:
36850c0d06caSMauro Carvalho Chehab 		setbacklight(gspca_dev, ctrl->val);
36860c0d06caSMauro Carvalho Chehab 		break;
36870c0d06caSMauro Carvalho Chehab 	case V4L2_CID_POWER_LINE_FREQUENCY:
36880c0d06caSMauro Carvalho Chehab 		setlightfreq(gspca_dev, ctrl->val);
36890c0d06caSMauro Carvalho Chehab 		break;
36900c0d06caSMauro Carvalho Chehab 	}
36910c0d06caSMauro Carvalho Chehab 	return gspca_dev->usb_err;
36920c0d06caSMauro Carvalho Chehab }
36930c0d06caSMauro Carvalho Chehab 
36940c0d06caSMauro Carvalho Chehab static const struct v4l2_ctrl_ops sd_ctrl_ops = {
36950c0d06caSMauro Carvalho Chehab 	.s_ctrl = sd_s_ctrl,
36960c0d06caSMauro Carvalho Chehab };
36970c0d06caSMauro Carvalho Chehab 
sd_init_controls(struct gspca_dev * gspca_dev)36980c0d06caSMauro Carvalho Chehab static int sd_init_controls(struct gspca_dev *gspca_dev)
36990c0d06caSMauro Carvalho Chehab {
37000c0d06caSMauro Carvalho Chehab 	struct sd *sd = (struct sd *)gspca_dev;
37010c0d06caSMauro Carvalho Chehab 	struct v4l2_ctrl_handler *hdl = &gspca_dev->ctrl_handler;
37020c0d06caSMauro Carvalho Chehab 	bool has_brightness = false;
37030c0d06caSMauro Carvalho Chehab 	bool has_contrast = false;
37040c0d06caSMauro Carvalho Chehab 	bool has_sat = false;
37050c0d06caSMauro Carvalho Chehab 	bool has_hvflip = false;
37060c0d06caSMauro Carvalho Chehab 	bool has_freq = false;
37070c0d06caSMauro Carvalho Chehab 	bool has_backlight = false;
37080c0d06caSMauro Carvalho Chehab 	bool has_exposure = false;
37090c0d06caSMauro Carvalho Chehab 	bool has_autogain = false;
37100c0d06caSMauro Carvalho Chehab 	bool has_gain = false;
37110c0d06caSMauro Carvalho Chehab 	bool has_sharpness = false;
37120c0d06caSMauro Carvalho Chehab 
37130c0d06caSMauro Carvalho Chehab 	switch (sd->sensor) {
37140c0d06caSMauro Carvalho Chehab 	case SENSOR_HV7131R:
37150c0d06caSMauro Carvalho Chehab 	case SENSOR_MI0360:
37160c0d06caSMauro Carvalho Chehab 	case SENSOR_PO3130NC:
37170c0d06caSMauro Carvalho Chehab 		break;
37180c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1310_SOC:
37190c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1320:
37200c0d06caSMauro Carvalho Chehab 	case SENSOR_MI1320_SOC:
37210c0d06caSMauro Carvalho Chehab 	case SENSOR_OV7660:
37220c0d06caSMauro Carvalho Chehab 		has_hvflip = true;
37230c0d06caSMauro Carvalho Chehab 		break;
37240c0d06caSMauro Carvalho Chehab 	case SENSOR_OV7670:
37250c0d06caSMauro Carvalho Chehab 		has_hvflip = has_freq = true;
37260c0d06caSMauro Carvalho Chehab 		break;
37270c0d06caSMauro Carvalho Chehab 	case SENSOR_PO1200:
37280c0d06caSMauro Carvalho Chehab 		has_hvflip = has_sharpness = true;
37290c0d06caSMauro Carvalho Chehab 		break;
37300c0d06caSMauro Carvalho Chehab 	case SENSOR_POxxxx:
37310c0d06caSMauro Carvalho Chehab 		has_brightness = has_contrast = has_sat = has_backlight =
37320c0d06caSMauro Carvalho Chehab 			has_exposure = has_autogain = has_gain =
37330c0d06caSMauro Carvalho Chehab 			has_sharpness = true;
37340c0d06caSMauro Carvalho Chehab 		break;
37350c0d06caSMauro Carvalho Chehab 	}
37360c0d06caSMauro Carvalho Chehab 
37370c0d06caSMauro Carvalho Chehab 	gspca_dev->vdev.ctrl_handler = hdl;
37380c0d06caSMauro Carvalho Chehab 	v4l2_ctrl_handler_init(hdl, 8);
37390c0d06caSMauro Carvalho Chehab 	if (has_brightness)
37400c0d06caSMauro Carvalho Chehab 		v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
37410c0d06caSMauro Carvalho Chehab 			V4L2_CID_BRIGHTNESS, 0, 255, 1, 128);
37420c0d06caSMauro Carvalho Chehab 	if (has_contrast)
37430c0d06caSMauro Carvalho Chehab 		v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
37440c0d06caSMauro Carvalho Chehab 			V4L2_CID_CONTRAST, 0, 255, 1, 127);
37450c0d06caSMauro Carvalho Chehab 	if (has_sat)
37460c0d06caSMauro Carvalho Chehab 		v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
37470c0d06caSMauro Carvalho Chehab 			V4L2_CID_SATURATION, 1, 127, 1, 63);
37480c0d06caSMauro Carvalho Chehab 	if (has_hvflip) {
37490c0d06caSMauro Carvalho Chehab 		sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
37500c0d06caSMauro Carvalho Chehab 			V4L2_CID_HFLIP, 0, 1, 1, 0);
37510c0d06caSMauro Carvalho Chehab 		sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
37520c0d06caSMauro Carvalho Chehab 			V4L2_CID_VFLIP, 0, 1, 1, 0);
37530c0d06caSMauro Carvalho Chehab 	}
37540c0d06caSMauro Carvalho Chehab 	if (has_sharpness)
37550c0d06caSMauro Carvalho Chehab 		v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
37560c0d06caSMauro Carvalho Chehab 			V4L2_CID_SHARPNESS, -1, 2, 1, -1);
37570c0d06caSMauro Carvalho Chehab 	if (has_freq)
37580c0d06caSMauro Carvalho Chehab 		v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
37590c0d06caSMauro Carvalho Chehab 			V4L2_CID_POWER_LINE_FREQUENCY,
37600c0d06caSMauro Carvalho Chehab 			V4L2_CID_POWER_LINE_FREQUENCY_60HZ, 0,
37610c0d06caSMauro Carvalho Chehab 			V4L2_CID_POWER_LINE_FREQUENCY_50HZ);
37620c0d06caSMauro Carvalho Chehab 	if (has_autogain)
37630c0d06caSMauro Carvalho Chehab 		v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
37640c0d06caSMauro Carvalho Chehab 			V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
37650c0d06caSMauro Carvalho Chehab 	if (has_gain)
37660c0d06caSMauro Carvalho Chehab 		v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
37670c0d06caSMauro Carvalho Chehab 			V4L2_CID_GAIN, 0, 78, 1, 0);
37680c0d06caSMauro Carvalho Chehab 	if (has_exposure)
37690c0d06caSMauro Carvalho Chehab 		v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
37700c0d06caSMauro Carvalho Chehab 			V4L2_CID_EXPOSURE, 0, 4095, 1, 450);
37710c0d06caSMauro Carvalho Chehab 	if (has_backlight)
37720c0d06caSMauro Carvalho Chehab 		v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
37730c0d06caSMauro Carvalho Chehab 			V4L2_CID_BACKLIGHT_COMPENSATION, 0, 15, 1, 15);
37740c0d06caSMauro Carvalho Chehab 
37750c0d06caSMauro Carvalho Chehab 	if (hdl->error) {
37760c0d06caSMauro Carvalho Chehab 		pr_err("Could not initialize controls\n");
37770c0d06caSMauro Carvalho Chehab 		return hdl->error;
37780c0d06caSMauro Carvalho Chehab 	}
37790c0d06caSMauro Carvalho Chehab 	if (sd->hflip)
37800c0d06caSMauro Carvalho Chehab 		v4l2_ctrl_cluster(2, &sd->hflip);
37810c0d06caSMauro Carvalho Chehab 	return 0;
37820c0d06caSMauro Carvalho Chehab }
37830c0d06caSMauro Carvalho Chehab 
37840c0d06caSMauro Carvalho Chehab /* sub-driver description */
37850c0d06caSMauro Carvalho Chehab static const struct sd_desc sd_desc = {
37860c0d06caSMauro Carvalho Chehab 	.name = MODULE_NAME,
37870c0d06caSMauro Carvalho Chehab 	.init_controls = sd_init_controls,
37880c0d06caSMauro Carvalho Chehab 	.config = sd_config,
37890c0d06caSMauro Carvalho Chehab 	.init = sd_init,
37900c0d06caSMauro Carvalho Chehab 	.start = sd_start,
37910c0d06caSMauro Carvalho Chehab 	.stopN = sd_stopN,
37920c0d06caSMauro Carvalho Chehab 	.stop0 = sd_stop0,
37930c0d06caSMauro Carvalho Chehab 	.pkt_scan = sd_pkt_scan,
37940c0d06caSMauro Carvalho Chehab };
37950c0d06caSMauro Carvalho Chehab 
37960c0d06caSMauro Carvalho Chehab /* -- module initialisation -- */
37970c0d06caSMauro Carvalho Chehab #define BF(bridge, flags) \
37980c0d06caSMauro Carvalho Chehab 	.driver_info = (BRIDGE_ ## bridge << 8) \
37990c0d06caSMauro Carvalho Chehab 		| (flags)
38000c0d06caSMauro Carvalho Chehab static const struct usb_device_id device_table[] = {
38010c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x041e, 0x405b), BF(VC0323, FL_VFLIP)},
38020c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x046d, 0x0892), BF(VC0321, 0)},
38030c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x046d, 0x0896), BF(VC0321, 0)},
38040c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x046d, 0x0897), BF(VC0321, 0)},
38050c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x0ac8, 0x0321), BF(VC0321, 0)},
38060c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x0ac8, 0x0323), BF(VC0323, 0)},
38070c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x0ac8, 0x0328), BF(VC0321, 0)},
38080c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x0ac8, 0xc001), BF(VC0321, 0)},
38090c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x0ac8, 0xc002), BF(VC0321, 0)},
38100c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x0ac8, 0xc301), BF(VC0323, FL_SAMSUNG)},
38110c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x15b8, 0x6001), BF(VC0323, 0)},
38120c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x15b8, 0x6002), BF(VC0323, 0)},
38130c0d06caSMauro Carvalho Chehab 	{USB_DEVICE(0x17ef, 0x4802), BF(VC0323, 0)},
38140c0d06caSMauro Carvalho Chehab 	{}
38150c0d06caSMauro Carvalho Chehab };
38160c0d06caSMauro Carvalho Chehab MODULE_DEVICE_TABLE(usb, device_table);
38170c0d06caSMauro Carvalho Chehab 
38180c0d06caSMauro Carvalho Chehab /* -- device connect -- */
sd_probe(struct usb_interface * intf,const struct usb_device_id * id)38190c0d06caSMauro Carvalho Chehab static int sd_probe(struct usb_interface *intf,
38200c0d06caSMauro Carvalho Chehab 			const struct usb_device_id *id)
38210c0d06caSMauro Carvalho Chehab {
38220c0d06caSMauro Carvalho Chehab 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
38230c0d06caSMauro Carvalho Chehab 				THIS_MODULE);
38240c0d06caSMauro Carvalho Chehab }
38250c0d06caSMauro Carvalho Chehab 
38260c0d06caSMauro Carvalho Chehab static struct usb_driver sd_driver = {
38270c0d06caSMauro Carvalho Chehab 	.name = MODULE_NAME,
38280c0d06caSMauro Carvalho Chehab 	.id_table = device_table,
38290c0d06caSMauro Carvalho Chehab 	.probe = sd_probe,
38300c0d06caSMauro Carvalho Chehab 	.disconnect = gspca_disconnect,
38310c0d06caSMauro Carvalho Chehab #ifdef CONFIG_PM
38320c0d06caSMauro Carvalho Chehab 	.suspend = gspca_suspend,
38330c0d06caSMauro Carvalho Chehab 	.resume = gspca_resume,
38340c0d06caSMauro Carvalho Chehab 	.reset_resume = gspca_resume,
38350c0d06caSMauro Carvalho Chehab #endif
38360c0d06caSMauro Carvalho Chehab };
38370c0d06caSMauro Carvalho Chehab 
38380c0d06caSMauro Carvalho Chehab module_usb_driver(sd_driver);
3839