AUOC_G101EAN_01_0.c
/* BEGIN PN: , Added by h84013687, 2013.08.13*/
#ifndef BUILD_LK
#include
#endif
#include "lcm_drv.h"
#ifdef BUILD_LK
#include
#elif defined(BUILD_UBOOT)
#include
#else
#include <../include/mt-plat/mt_gpio.h>
#include <../include/mt-plat/mt6735/include/mach/gpio_const.h>
#endif
#ifdef BUILD_LK
#define LCD_DEBUG(fmt) dprintf(CRITICAL,fmt)
#else
#define LCD_DEBUG(fmt) printk(fmt)
#endif
#define LCM_DSI_CMD_MODE 0
#define FRAME_WIDTH (800)
#define FRAME_HEIGHT (1280)
#define REGFLAG_DELAY 0xFC
#define REGFLAG_END_OF_TABLE 0xFD // END OF REGISTERS MARKER
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
const static unsigned int BL_MIN_LEVEL =20;
static LCM_UTIL_FUNCS lcm_util = {0};
#define SET_RESET_PIN(v) (lcm_util.set_reset_pin((v)))
#define UDELAY(n) (lcm_util.udelay(n))
#define MDELAY(n) (lcm_util.mdelay(n))
#define dsi_set_cmdq_V2(cmd, count, ppara, force_update) lcm_util.dsi_set_cmdq_V2(cmd, count, ppara, force_update)
#define dsi_set_cmdq(pdata, queue_size, force_update) lcm_util.dsi_set_cmdq(pdata, queue_size, force_update)
#define wrtie_cmd(cmd) lcm_util.dsi_write_cmd(cmd)
#define write_regs(addr, pdata, byte_nums) lcm_util.dsi_write_regs(addr, pdata, byte_nums)
#define read_reg(cmd) lcm_util.dsi_dcs_read_lcm_reg(cmd)
#define read_reg_v2(cmd, buffer, buffer_size) lcm_util.dsi_dcs_read_lcm_reg_v2(cmd, buffer, buffer_size)
struct LCM_setting_table {
unsigned char cmd;
unsigned char count;
unsigned char para_list[128];
};
static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util)
{
memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS));
}
static void lcm_get_params(LCM_PARAMS *params)
#if 1
{
memset(params, 0, sizeof(LCM_PARAMS));
params->type = LCM_TYPE_DSI;
params->width = FRAME_WIDTH;
params->height = FRAME_HEIGHT;
// enable tearing-free
params->dbi.te_mode = LCM_DBI_TE_MODE_VSYNC_ONLY;
params->dbi.te_edge_polarity = LCM_POLARITY_RISING;
#if (LCM_DSI_CMD_MODE)
params->dsi.mode = CMD_MODE;
#else
params->dsi.mode =SYNC_PULSE_VDO_MODE; //SYNC_PULSE_VDO_MODE; //BURST_VDO_MODE;
//params->dsi.mode = BURST_VDO_MODE;
#endif
// DSI
/* Command mode setting */
params->dsi.LANE_NUM = LCM_FOUR_LANE;
params->dsi.data_format.format = LCM_DSI_FORMAT_RGB888;
//video mode timing
params->dsi.PS=LCM_PACKED_PS_24BIT_RGB888;
params->dsi.vertical_sync_active = 4; //8; //2;
params->dsi.vertical_backporch = 8; //18; //14;
params->dsi.vertical_frontporch = 8; //20; //16;
params->dsi.vertical_active_line = FRAME_HEIGHT;
params->dsi.horizontal_sync_active = 4; //2;
params->dsi.horizontal_backporch = 132;//120; //60; //42;
params->dsi.horizontal_frontporch = 24;//100; //60; //44;
params->dsi.horizontal_active_pixel = FRAME_WIDTH;
params->dsi.PLL_CLOCK =247;//208; 210
params->dsi.esd_check_enable = 1; //这是esd-check的开关标志,1是打开,0是关闭;
params->dsi.customization_esd_check_enable = 1; //这是esd-check模式的配置,0对应着TE侦测,1对应着读LCM寄存器;
params->dsi.lcm_esd_check_table[0].cmd = 0x0a;
params->dsi.lcm_esd_check_table[0].count = 1;
params->dsi.lcm_esd_check_table[0].para_list[0] = 0x9c;
}
#else
{
memset(params, 0, sizeof(LCM_PARAMS));
params->type = LCM_TYPE_DSI;
params->width = FRAME_WIDTH;
params->height = FRAME_HEIGHT;
// enable tearing-free
params->dbi.te_mode = LCM_DBI_TE_MODE_VSYNC_ONLY;
params->dbi.te_edge_polarity = LCM_POLARITY_RISING;
#if (LCM_DSI_CMD_MODE)
params->dsi.mode = CMD_MODE;
#else
params->dsi.mode =SYNC_PULSE_VDO_MODE; //SYNC_PULSE_VDO_MODE; //BURST_VDO_MODE;
//params->dsi.mode = BURST_VDO_MODE;
#endif
// DSI
/* Command mode setting */
params->dsi.LANE_NUM = LCM_FOUR_LANE;
params->dsi.data_format.format = LCM_DSI_FORMAT_RGB888;
//video mode timing
params->dsi.PS=LCM_PACKED_PS_24BIT_RGB888;
params->dsi.vertical_sync_active = 4;
params->dsi.vertical_backporch = 8;
params->dsi.vertical_frontporch = 8;
params->dsi.vertical_active_line = FRAME_HEIGHT;
params->dsi.horizontal_sync_active = 4;
params->dsi.horizontal_backporch = 132;
params->dsi.horizontal_frontporch = 24;
params->dsi.horizontal_active_pixel = FRAME_WIDTH;
params->dsi.PLL_CLOCK =247;//208; 210
}
#endif
#if 1
static struct LCM_setting_table lcm_initialization_setting[] = {
//{0x00,1,{0x00}},
//{0xFF,3,{0x12,0x87,0x01}}, //寄存器0xFF,下3个参数
//SLP OUT
{0x11,1,{0x00}},
{REGFLAG_DELAY,120,{}},
//DISP ON
{0x29,0,{0x00}},
{REGFLAG_DELAY,20,{}},
//{REGFLAG_DELAY, 200, {}},
{0x29,01,{0x00}},
{REGFLAG_DELAY, 20, {}},
//ESD check
{0x0a,1,{0x9c}},
{REGFLAG_DELAY,20,{}},
{REGFLAG_END_OF_TABLE, 0x00, {}}
};
/*static struct LCM_setting_table lcm_initialization_setting[] = {
{0x00,1,{0x00}},
{0xFF,3,{0x12,0x87,0x01}},
{0x00,1,{0x80}},
{0xFF,2,{0x12,0x87}},
{0x00,1,{0xA0}},
{0xF4,1,{0x01}},
{0x00,1,{0xA6}},
{0xB3,1,{0x08}},
{0x00,1,{0x90}},
{0xB3,1,{0x00}},
{0x00,1,{0x00}},
{0x2A,4,{0x00,0x00,0x03,0X1F}},
{0x00,1,{0x92}},
{0xB3,1,{0x40}},
{0x00,1,{0x80}},
{0xF6,1,{0x01}},
{0x00,1,{0x80}},
{0xC1,1,{0x25}},
{0x00,1,{0x92}},
{0xC4,1,{0x00}},
{0x00,1,{0x92}},
{0xB3,1,{0x02}},
{0x00,1,{0x90}},
{0xB6,1,{0xB6}},
{0x00,1,{0x80}},
{0xC0,7,{0x00,0x6F,0x00,0X10,0X10,0X00,0X64}},
{0x00,1,{0x87}},
{0xC0,2,{0x10,0x10}},
{0x00,1,{0x90}},
{0xC0,6,{0x00,0x5C,0X00,0X01,0X00,0X04,}},
{0x00,1,{0xA2}},
{0xC0,3,{0x01,0x00,0x00}},
{0x00,1,{0xb3}},
{0xC0,2,{0x00,0x55}},
{0x00,1,{0x81}},
{0xc1,1,{0x55}},
{0x00,1,{0xa0}},
{0xC4,7,{0x05,0x10,0x04,0X02,0X05,0X15,0X11}},
{0x00,1,{0xa7}},
{0xC4,7,{0x05,0x10,0X07,0X02,0X05,0X15,0x11}},
{0x00,1,{0xb0}},
{0xC4,2,{0x00,0x00}},
{0x00,1,{0x91}},
{0xC5,2,{0x4b,0xa2}},
{0x00,1,{0x00}},
{0xd8,2,{0x84,0x84}},
{0x00,1,{0x00}},
{0xd9,1,{0x40}},
{0x00,1,{0xb3}},
{0xc5,1,{0x84}},
{0x00,1,{0x97}},
{0xc5,1,{0xdd}},
{0x00,1,{0xbb}},
{0xc5,1,{0x8a}},
{0x00,1,{0x82}},
{0xc4,1,{0x0a}},
{0x00,1,{0xc6}},
{0xb0,1,{0x03}},
{0x00,1,{0xc2}},
{0xf5,1,{0x40}},
{0x00,1,{0xc3}},
{0xf5,1,{0x85}},
{0x00,1,{0x87}},
{0xc4,1,{0x18}},
{0x00,1,{0x00}},
{0xd0,1,{0x40}},
{0x00,1,{0x00}},
{0xd1,2,{0x00,0x00}},
{0x00,1,{0xb2}},
{0xf5,2,{0x00,0x00}},
{0x00,1,{0xb6}},
{0xf5,2,{0x00,0x00}},
{0x00,1,{0x94}},
{0xf5,2,{0x00,0x00}},
{0x00,1,{0xd2}},
{0xf5,2,{0x06,0x15}},
{0x00,1,{0xb4}},
{0xc5,1,{0xcc}},
{0x00,1,{0x90}},
{0xf5,4,{0x02,0x11,0x02,0X15}},
{0x00,1,{0x90}},
{0xc5,1,{0x50}},
{0x00,1,{0x94}},
{0xc5,1,{0x66}},
{0x00,1,{0x80}},
{0xcb,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0x87}},
{0xcb,4,{0x00,0x00,0x00,0X00}},
{0x00,1,{0x90}},
{0xcb,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0x97}},
{0xcb,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0x9e}},
{0xcb,1,{0x00}},
{0x00,1,{0xa0}},
{0xcb,7,{0xff,0xff,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xa7}},
{0xcb,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xae}},
{0xcb,1,{0x00}},
{0x00,1,{0xb0}},
{0xcb,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xb7}},
{0xcb,7,{0xff,0xff,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xbe}},
{0xcb,1,{0x00}},
{0x00,1,{0xc0}},
{0xcb,7,{0x05,0x05,0X05,0X05,0X05,0X05,0x05}},
{0x00,1,{0xc7}},
{0xcb,7,{0x05,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xce}},
{0xcb,1,{0x00}},
{0x00,1,{0xd0}},
{0xcb,7,{0x05,0x05,0X05,0X05,0X05,0X00,0x00}},
{0x00,1,{0xd7}},
{0xcb,7,{0x05,0x05,0X05,0X05,0X05,0X05,0x05}},
{0x00,1,{0xde}},
{0xcb,1,{0x05}},
{0x00,1,{0xe0}},
{0xcb,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xe7}},
{0xcb,7,{0x05,0x05,0X05,0X05,0X05,0X00,0x00}},
{0x00,1,{0xf0}},
{0xcb,7,{0xff,0xff,0Xff,0Xff,0Xff,0Xff,0xff}},
{0x00,1,{0xf7}},
{0xcb,4,{0xff,0xff,0xff,0Xff}},
{0x00,1,{0x80}},
{0xcc,7,{0x09,0x09,0X0b,0X0b,0X0d,0X0d,0x0f}},
{0x00,1,{0x87}},
{0xcc,7,{0x0f,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0x8e}},
{0xcc,1,{0x00}},
{0x00,1,{0x90}},
{0xcc,7,{0x29,0x29,0X2a,0X2a,0X01,0X00,0x00}},
{0x00,1,{0x97}},
{0xcc,7,{0x09,0x09,0X0b,0X0b,0X0d,0X0d,0x0f}},
{0x00,1,{0x9e}},
{0xcc,1,{0x0f}},
{0x00,1,{0xa0}},
{0xcc,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xa7}},
{0xcc,7,{0x29,0x29,0X2a,0X2a,0X01,0X00,0x00}},
{0x00,1,{0xb0}},
{0xcc,7,{0x09,0x09,0X0b,0X0b,0X0d,0X0d,0x0f}},
{0x00,1,{0xb7}},
{0xcc,7,{0x0f,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xbe}},
{0xcc,1,{0x00}},
{0x00,1,{0xc0}},
{0xcc,7,{0x29,0x29,0X2a,0X2a,0X01,0X00,0x00}},
{0x00,1,{0xc7}},
{0xcc,7,{0x09,0x09,0X0b,0X0b,0X0d,0X0d,0x0f}},
{0x00,1,{0xce}},
{0xcc,1,{0x0f}},
{0x00,1,{0xd0}},
{0xcc,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xd7}},
{0xcc,7,{0x29,0x29,0X2a,0X2a,0X01,0X00,0x00}},
{0x00,1,{0x80}},
{0xce,7,{0x82,0x01,0X48,0X81,0X01,0X00,0x00}},
{0x00,1,{0x87}},
{0xce,5,{0x00,0x00,0X00,0X00,0X00}},
{0x00,1,{0x90}},
{0xce,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0x97}},
{0xce,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xa0}},
{0xce,7,{0x18,0x01,0X05,0X00,0X00,0X48,0x00}},
{0x00,1,{0xa7}},
{0xce,7,{0x18,0x00,0X05,0X00,0X00,0X00,0x00}},
{0x00,1,{0xb0}},
{0xce,7,{0x18,0x00,0X05,0X01,0X00,0X48,0x00}},
{0x00,1,{0xb7}},
{0xce,7,{0x10,0x00,0X05,0X02,0X00,0X00,0x00}},
{0x00,1,{0xc0}},
{0xce,7,{0x10,0x00,0X05,0X02,0X00,0X48,0x00}},
{0x00,1,{0xc7}},
{0xce,7,{0x10,0x01,0X05,0X04,0X00,0X00,0x00}},
{0x00,1,{0xd0}},
{0xce,7,{0x10,0x01,0X05,0X03,0X00,0X48,0x00}},
{0x00,1,{0xd7}},
{0xce,7,{0x10,0x02,0X05,0X06,0X00,0X00,0x00}},
{0x00,1,{0x80}},
{0xcf,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0x87}},
{0xcf,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0x90}},
{0xcf,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0x97}},
{0xcf,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xa0}},
{0xcf,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xa7}},
{0xcf,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xb0}},
{0xcf,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xb7}},
{0xcf,7,{0x00,0x00,0X00,0X00,0X00,0X00,0x00}},
{0x00,1,{0xc0}},
{0xcf,7,{0x64,0x64,0X20,0X20,0X00,0X00,0x01}},
{0x00,1,{0xc7}},
{0xcf,4,{0x81,0x00,0x00,0X08}},
{0x00,1,{0xb5}},
{0xc5,6,{0x3f,0x80,0Xff,0X3f,0X80,0Xff}},
{0x00,1,{0x00}},
{0xe1,7,{0x14,0x1c,0X27,0X35,0X44,0X51,0x52}},
{0xe1,7,{0x7d,0x6c,0X83,0X80,0X6e,0X80,0x5b}},
{0xe1,6,{0x4f,0x43,0X33,0X24,0X03,0X00}},
{0x00,1,{0x00}},
{0xe2,7,{0x03,0X1c,0X27,0X35,0X44,0x51,0x52}},
{0xe2,7,{0x7d,0x6c,0X83,0X80,0X6e,0X80,0x5b}},
{0xe2,6,{0x4f,0x43,0X33,0X24,0X03,0X00}},
{0x00,1,{0x00}},
{0xff,3,{0xff,0xff,0xff}},
{0x11,01,{0x00}},
{REGFLAG_DELAY, 200, {}},
{0x29,01,{0x00}},
{REGFLAG_DELAY, 200, {}},
{REGFLAG_END_OF_TABLE, 0x00, {}}
};*/
static void push_table(struct LCM_setting_table *table, unsigned int count, unsigned char force_update)
{
unsigned int i;
for(i = 0; i < count; i++)
{
unsigned cmd;
cmd = table[i].cmd;
switch (cmd) {
case REGFLAG_DELAY:
MDELAY(table[i].count);
break;
case REGFLAG_END_OF_TABLE :
break;
default:
dsi_set_cmdq_V2(cmd, table[i].count, table[i].para_list, force_update);
}
}
}
#else
static void init_lcm_registers(void)
{
unsigned int data_array[16];
data_array[0]=0x00063902;
data_array[1]=0x52AA55F0;
data_array[2]=0x00000008;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00023902;
data_array[1]=0x000025B2;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00033902;
data_array[1]=0x006363BB;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00033902;
data_array[1]=0x00000FBC;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00053902;
data_array[1]=0x0D4001BD;
data_array[2]=0x00000006;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00023902;
data_array[1]=0x000083C8;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00063902;
data_array[1]=0x52AA55F0;
data_array[2]=0x00000108;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00023902;
data_array[1]=0x000028B3;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00023902;
data_array[1]=0x000014B4;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00023902;
data_array[1]=0x000044B9;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00033902;
data_array[1]=0x000078BC;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00033902;
data_array[1]=0x000078BD;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00033902;
data_array[1]=0x008900BE;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00023902;
data_array[1]=0x000000CA;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00023902;
data_array[1]=0x000004CE;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00063902;
data_array[1]=0x52AA55F0;
data_array[2]=0x00000208;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00023902;
data_array[1]=0x000042B0;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00113902;
data_array[1]=0x000000D1;
data_array[2]=0x003E0018;
data_array[3]=0x0073005A;
data_array[4]=0x00B9009A;
data_array[5]=0x000000EB;
dsi_set_cmdq(data_array, 6, 1);
data_array[0]=0x00113902;
data_array[1]=0x011301D2;
data_array[2]=0x01850153;
data_array[3]=0x020B02CF;
data_array[4]=0x0243020C;
data_array[5]=0x0000007D;
dsi_set_cmdq(data_array, 6, 1);
data_array[0]=0x00113902;
data_array[1]=0x02A102D3;
data_array[2]=0x03F602D4;
data_array[3]=0x03430326;
data_array[4]=0x0386036C;
data_array[5]=0x000000A1;
dsi_set_cmdq(data_array, 6, 1);
data_array[0]=0x00053902;
data_array[1]=0x03BA03D4;
data_array[2]=0x000000FF;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x52AA55F0;
data_array[2]=0x00000308;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00053902;
data_array[1]=0x000000B0;
data_array[2]=0x00000000;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00053902;
data_array[1]=0x000000B1;
data_array[2]=0x00000000;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00083902;
data_array[1]=0x090001B2;
data_array[2]=0x48340003;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00083902;
data_array[1]=0x080001B3;
data_array[2]=0x48340003;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x000B3902;
data_array[1]=0x0405F0B6;
data_array[2]=0x00000005;
data_array[3]=0x00483400;
dsi_set_cmdq(data_array, 4, 1);
data_array[0]=0x000B3902;
data_array[1]=0x0405F0B7;
data_array[2]=0x00000005;
data_array[3]=0x00483400;
dsi_set_cmdq(data_array, 4, 1);
data_array[0]=0x00083902;
data_array[1]=0x000484BA;
data_array[2]=0x48340107;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00083902;
data_array[1]=0x000484BB;
data_array[2]=0x48340106;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00033902;
data_array[1]=0x000010C4;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00033902;
data_array[1]=0x000000C5;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00063902;
data_array[1]=0x52AA55F0;
data_array[2]=0x00000508;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00053902;
data_array[1]=0x000333B0;
data_array[2]=0x00000003;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00033902;
data_array[1]=0x000030B1;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00043902;
data_array[1]=0x000103B2;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00053902;
data_array[1]=0x810082B3;
data_array[2]=0x00000038;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00053902;
data_array[1]=0x0775D5B4;
data_array[2]=0x00000057;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00073902;
data_array[1]=0xD50001B6;
data_array[2]=0x00570771;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x000009B9;
data_array[2]=0x00000005;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x000775C0;
data_array[2]=0x00000557;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00023902;
data_array[1]=0x000020C6;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00063902;
data_array[1]=0x012500D0;
data_array[2]=0x00000000;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x022500D1;
data_array[2]=0x00000000;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x52AA55F0;
data_array[2]=0x00000608;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x023232B0;
data_array[2]=0x00000302;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x333303B1;
data_array[2]=0x00003D08;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x3D0A0AB2;
data_array[2]=0x00001717;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x191616B3;
data_array[2]=0x00001819;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00033902;
data_array[1]=0x003318B4;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00063902;
data_array[1]=0x003232B5;
data_array[2]=0x00000100;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x333301B6;
data_array[2]=0x00003D08;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x3D0A0AB7;
data_array[2]=0x00001111;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00063902;
data_array[1]=0x131010B8;
data_array[2]=0x00001213;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00033902;
data_array[1]=0x003312B9;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00053902;
data_array[1]=0xA555AAFF;
data_array[2]=0x00000080;
dsi_set_cmdq(data_array, 3, 1);
data_array[0]=0x00023902;
data_array[1]=0x0000086F;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00023902;
data_array[1]=0x000000FC;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00023902;
data_array[1]=0x0000096F;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00023902;
data_array[1]=0x000082F7;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00023902;
data_array[1]=0x00000B6F;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00023902;
data_array[1]=0x0000E0F7;
dsi_set_cmdq(data_array, 2, 1);
data_array[0]=0x00013902;
data_array[1]=0x00000011;
dsi_set_cmdq(data_array, 2, 1);
MDELAY(120);
data_array[0]=0x00013902;
data_array[1]=0x00000029;
dsi_set_cmdq(data_array, 2, 1);
}
#endif
static void lcm_init(void)
{
SET_RESET_PIN(1);
MDELAY(5);
SET_RESET_PIN(0);
MDELAY(10);
SET_RESET_PIN(1);
MDELAY(120);
// init_lcm_registers();
push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1);
LCD_DEBUG("uboot:boe_jd9365_lcm_init\n");
}
static void lcm_suspend(void)
{
SET_RESET_PIN(0);
MDELAY(5);
SET_RESET_PIN(1);
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(120);
}
static void lcm_resume(void)
{
lcm_init();
LCD_DEBUG("kernel:boe_jd9365_lcm_resume\n");
}
static unsigned int lcm_compare_id(void)
{
return 1;
}
LCM_DRIVER AUOC_G101EAN_01_0_lcm_drv=
{
.name ="AUOC_G101EAN_01_0_lcm_drv",
.set_util_funcs = lcm_set_util_funcs,
.get_params = lcm_get_params,
.init = lcm_init,
.suspend = lcm_suspend,
.resume = lcm_resume,
.compare_id = lcm_compare_id,
};