static void init_lcm_registers(void)
{
	unsigned int data_array[16];
		
#if 1

	//data_array[0] = 0x00011500;  //software reset					 
	//dsi_set_cmdq(data_array, 1, 1);
    
    data_array[0] = 0x0BAE1500;                                         
    dsi_set_cmdq(data_array, 1, 1);
    
    data_array[0] = 0xEAEE1500;                                          
    dsi_set_cmdq(data_array, 1, 1);
    
    data_array[0] = 0x5FEF1500;                                          
    dsi_set_cmdq(data_array, 1, 1);
    
    data_array[0] = 0x68F21500;                                          
    dsi_set_cmdq(data_array, 1, 1);
    
    data_array[0] = 0x03A71500;                                          
    dsi_set_cmdq(data_array, 1, 1);

    //data_array[0] = 0xFFB21500;                                          
    //dsi_set_cmdq(data_array, 1, 1);

    //data_array[0] = 0x10CC1500;                                          
    //dsi_set_cmdq(data_array, 1, 1);

	MDELAY(20);

#if 0

	data_array[0] = 0x7DB21500;  					 
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x0BAE1500;  					 
	dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0x18B61500;  					 
	dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0xEAEE1500;  					 
	dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0x5FEF1500;  					 
	dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0x68F21500;  					 
	dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0x00EE1500;  					 
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x00EF1500;  					 
	dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0x64D21500;  					 
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x00101500;  //sleep out                        
	dsi_set_cmdq(data_array, 1, 1);
	MDELAY(20);
#endif

	//data_array[0] = 0xEFB11500;                       
	//dsi_set_cmdq(data_array, 1, 1);
	//MDELAY(1);

	//data_array[0] = 0x00290500;  //display on                        
	//dsi_set_cmdq(data_array, 1, 1);
#endif

#if 0
	data_array[0] = 0x00010500;  //software reset					 
	dsi_set_cmdq(data_array, 1, 1);
	
	MDELAY(20);

	data_array[0] = 0x00023902; 
	data_array[1] = 0x00000BAE; 					 
	dsi_set_cmdq(data_array, 2, 1);
	MDELAY(1);
	
	data_array[0] = 0x00023902; 
	data_array[1] = 0x0000EAEE; 					 
	dsi_set_cmdq(data_array, 2, 1);
	MDELAY(1);
	
	data_array[0] = 0x00023902; 
	data_array[1] = 0x00005FEF; 					 
	dsi_set_cmdq(data_array, 2, 1);
	MDELAY(1);
	
	data_array[0] = 0x00023902; 
	data_array[1] = 0x000068F2; 					 
	dsi_set_cmdq(data_array, 2, 1);
	MDELAY(1);
	
	data_array[0] = 0x00023902; 
	data_array[1] = 0x000000EE; 					 
	dsi_set_cmdq(data_array, 2, 1);
	MDELAY(1);
	
	data_array[0] = 0x00023902; 
	data_array[1] = 0x000000EF; 					 
	dsi_set_cmdq(data_array, 2, 1);
	MDELAY(1);
	
	data_array[0] = 0x00100500;  //sleep out                        
	dsi_set_cmdq(data_array, 1, 1);
	MDELAY(20);

	data_array[0] = 0x00290500;  //display on                        
	dsi_set_cmdq(data_array, 1, 1);
#endif
	//MDELAY(5);
}
static void init_lcm_registers(void)
{
    int i;

#if defined(BUILD_LK)
        printf("mycat LCD otm8009a_aizhuoertai_a4019n50q0_mcu_wvga \n");
#endif
send_cmd(0xff00); send_data(0x80);
send_cmd(0xff01); send_data(0x09);
send_cmd(0xff02); send_data(0x01);
send_cmd(0xff80); send_data(0x80);
send_cmd(0xff81); send_data(0x09);
send_cmd(0xff03); send_data(0x01);
send_cmd(0xc5b1); send_data(0xA9);	
send_cmd(0xc591); send_data(0x0F);    
send_cmd(0xc0B4); send_data(0x50);
	
send_cmd(0xE100); send_data(0x00);
send_cmd(0xE101); send_data(0x09);
send_cmd(0xE102); send_data(0x0F);
send_cmd(0xE103); send_data(0x0E);
send_cmd(0xE104); send_data(0x07);
send_cmd(0xE105); send_data(0x10);
send_cmd(0xE106); send_data(0x0B);
send_cmd(0xE107); send_data(0x0A);
send_cmd(0xE108); send_data(0x04);
send_cmd(0xE109); send_data(0x07);
send_cmd(0xE10A); send_data(0x0B);
send_cmd(0xE10B); send_data(0x08);
send_cmd(0xE10C); send_data(0x0F);
send_cmd(0xE10D); send_data(0x10);
send_cmd(0xE10E); send_data(0x0A);
send_cmd(0xE10F); send_data(0x01);
	
send_cmd(0xE200); send_data(0x00);
send_cmd(0xE201); send_data(0x09);
send_cmd(0xE202); send_data(0x0F);
send_cmd(0xE203); send_data(0x0E);
send_cmd(0xE204); send_data(0x07);
send_cmd(0xE205); send_data(0x10);
send_cmd(0xE206); send_data(0x0B);
send_cmd(0xE207); send_data(0x0A);
send_cmd(0xE208); send_data(0x04);
send_cmd(0xE209); send_data(0x07);
send_cmd(0xE20A); send_data(0x0B);
send_cmd(0xE20B); send_data(0x08);
send_cmd(0xE20C); send_data(0x0F);
send_cmd(0xE20D); send_data(0x10);
send_cmd(0xE20E); send_data(0x0A);
send_cmd(0xE20F); send_data(0x01);
	
send_cmd(0xD900); send_data(0x4E);
send_cmd(0xc181); send_data(0x66);
send_cmd(0xc1a1); send_data(0x08);
send_cmd(0xc592); send_data(0x01);
send_cmd(0xc595); send_data(0x34);
send_cmd(0xd800); send_data(0x79);	
send_cmd(0xd801); send_data(0x79);	
send_cmd(0xc594); send_data(0x33);
send_cmd(0xc0a3); send_data(0x1B);    
send_cmd(0xc582); send_data(0x83);
send_cmd(0xc481); send_data(0x83);
send_cmd(0xc1a1); send_data(0x0E);
send_cmd(0xb3a6); send_data(0x20);
send_cmd(0xb3a7); send_data(0x01);
send_cmd(0xce80); send_data(0x85);
send_cmd(0xce81); send_data(0x01); 
send_cmd(0xce82); send_data(0x00);	
send_cmd(0xce83); send_data(0x84); 
send_cmd(0xce84); send_data(0x01); 
send_cmd(0xce85); send_data(0x00);
send_cmd(0xcea0); send_data(0x18); 
send_cmd(0xcea1); send_data(0x04); 
send_cmd(0xcea2); send_data(0x03); 
send_cmd(0xcea3); send_data(0x39); 
send_cmd(0xcea4); send_data(0x00); 
send_cmd(0xcea5); send_data(0x00); 
send_cmd(0xcea6); send_data(0x00);
send_cmd(0xcea7); send_data(0x18); 
send_cmd(0xcea8); send_data(0x03);
send_cmd(0xcea9); send_data(0x03); 
send_cmd(0xceaa); send_data(0x3a);
send_cmd(0xceab); send_data(0x00); 
send_cmd(0xceac); send_data(0x00); 
send_cmd(0xcead); send_data(0x00); 
send_cmd(0xceb0); send_data(0x18);
send_cmd(0xceb1); send_data(0x02); 
send_cmd(0xceb2); send_data(0x03); 
send_cmd(0xceb3); send_data(0x3b); 
send_cmd(0xceb4); send_data(0x00); 
send_cmd(0xceb5); send_data(0x00); 
send_cmd(0xceb6); send_data(0x00);
send_cmd(0xceb7); send_data(0x18);
send_cmd(0xceb8); send_data(0x01); 
send_cmd(0xceb9); send_data(0x03); 
send_cmd(0xceba); send_data(0x3c); 
send_cmd(0xcebb); send_data(0x00); 
send_cmd(0xcebc); send_data(0x00); 
send_cmd(0xcebd); send_data(0x00);
send_cmd(0xcfc0); send_data(0x01); 
send_cmd(0xcfc1); send_data(0x01); 
send_cmd(0xcfc2); send_data(0x20); 
send_cmd(0xcfc3); send_data(0x20); 
send_cmd(0xcfc4); send_data(0x00); 
send_cmd(0xcfc5); send_data(0x00); 
send_cmd(0xcfc6); send_data(0x01); 
send_cmd(0xcfc7); send_data(0x00);    
send_cmd(0xcfc8); send_data(0x00); 
send_cmd(0xcfc9); send_data(0x00);    
send_cmd(0xcfd0); send_data(0x00);
send_cmd(0xcb80); send_data(0x00); 
send_cmd(0xcb81); send_data(0x00); 
send_cmd(0xcb82); send_data(0x00); 
send_cmd(0xcb83); send_data(0x00); 
send_cmd(0xcb84); send_data(0x00); 
send_cmd(0xcb85); send_data(0x00); 
send_cmd(0xcb86); send_data(0x00); 
send_cmd(0xcb87); send_data(0x00); 
send_cmd(0xcb88); send_data(0x00); 
send_cmd(0xcb89); send_data(0x00); 
send_cmd(0xcb90); send_data(0x00);
send_cmd(0xcb91); send_data(0x00);
send_cmd(0xcb92); send_data(0x00);
send_cmd(0xcb93); send_data(0x00);
send_cmd(0xcb94); send_data(0x00);
send_cmd(0xcb95); send_data(0x00);
send_cmd(0xcb96); send_data(0x00);
send_cmd(0xcb97); send_data(0x00);
send_cmd(0xcb98); send_data(0x00);
send_cmd(0xcb99); send_data(0x00);
send_cmd(0xcb9a); send_data(0x00);
send_cmd(0xcb9b); send_data(0x00);
send_cmd(0xcb9c); send_data(0x00);
send_cmd(0xcb9d); send_data(0x00);
send_cmd(0xcb9e); send_data(0x00);
send_cmd(0xcba0); send_data(0x00); 
send_cmd(0xcba1); send_data(0x00); 
send_cmd(0xcba2); send_data(0x00); 
send_cmd(0xcba3); send_data(0x00); 
send_cmd(0xcba4); send_data(0x00); 
send_cmd(0xcba5); send_data(0x00); 
send_cmd(0xcba6); send_data(0x00); 
send_cmd(0xcba7); send_data(0x00); 
send_cmd(0xcba8); send_data(0x00); 
send_cmd(0xcba9); send_data(0x00); 
send_cmd(0xcbaa); send_data(0x00); 
send_cmd(0xcbab); send_data(0x00); 
send_cmd(0xcbac); send_data(0x00); 
send_cmd(0xcbad); send_data(0x00); 
send_cmd(0xcbae); send_data(0x00);
send_cmd(0xcbb0); send_data(0x00); 
send_cmd(0xcbb1); send_data(0x00); 
send_cmd(0xcbb2); send_data(0x00); 
send_cmd(0xcbb3); send_data(0x00); 
send_cmd(0xcbb4); send_data(0x00); 
send_cmd(0xcbb5); send_data(0x00); 
send_cmd(0xcbb6); send_data(0x00); 
send_cmd(0xcbb7); send_data(0x00); 
send_cmd(0xcbb8); send_data(0x00); 
send_cmd(0xcbb9); send_data(0x00);
send_cmd(0xcbc0); send_data(0x00); 
send_cmd(0xcbc1); send_data(0x04); 
send_cmd(0xcbc2); send_data(0x04); 
send_cmd(0xcbc3); send_data(0x04); 
send_cmd(0xcbc4); send_data(0x04); 
send_cmd(0xcbc5); send_data(0x04); 
send_cmd(0xcbc6); send_data(0x00); 
send_cmd(0xcbc7); send_data(0x00); 
send_cmd(0xcbc8); send_data(0x00); 
send_cmd(0xcbc9); send_data(0x00); 
send_cmd(0xcbca); send_data(0x00); 
send_cmd(0xcbcb); send_data(0x00); 
send_cmd(0xcbcc); send_data(0x00); 
send_cmd(0xcbcd); send_data(0x00); 
send_cmd(0xcbce); send_data(0x00);
send_cmd(0xcbd0); send_data(0x00); 
send_cmd(0xcbd1); send_data(0x00); 
send_cmd(0xcbd2); send_data(0x00); 
send_cmd(0xcbd3); send_data(0x00); 
send_cmd(0xcbd4); send_data(0x00); 
send_cmd(0xcbd5); send_data(0x00); 
send_cmd(0xcbd6); send_data(0x04); 
send_cmd(0xcbd7); send_data(0x04); 
send_cmd(0xcbd8); send_data(0x04); 
send_cmd(0xcbd9); send_data(0x04); 
send_cmd(0xcbda); send_data(0x04); 
send_cmd(0xcbdb); send_data(0x00); 
send_cmd(0xcbdc); send_data(0x00); 
send_cmd(0xcbdd); send_data(0x00); 
send_cmd(0xcbde); send_data(0x00);
send_cmd(0xcbe0); send_data(0x00); 
send_cmd(0xcbe1); send_data(0x00); 
send_cmd(0xcbe2); send_data(0x00); 
send_cmd(0xcbe3); send_data(0x00); 
send_cmd(0xcbe4); send_data(0x00); 
send_cmd(0xcbe5); send_data(0x00); 
send_cmd(0xcbe6); send_data(0x00); 
send_cmd(0xcbe7); send_data(0x00); 
send_cmd(0xcbe8); send_data(0x00); 
send_cmd(0xcbe9); send_data(0x00);
send_cmd(0xcbf0); send_data(0xFF); 
send_cmd(0xcbf1); send_data(0xFF); 
send_cmd(0xcbf2); send_data(0xFF); 
send_cmd(0xcbf3); send_data(0xFF); 
send_cmd(0xcbf4); send_data(0xFF); 
send_cmd(0xcbf5); send_data(0xFF); 
send_cmd(0xcbf6); send_data(0xFF); 
send_cmd(0xcbf7); send_data(0xFF); 
send_cmd(0xcbf8); send_data(0xFF); 
send_cmd(0xcbf9); send_data(0xFF);
send_cmd(0xcc80); send_data(0x00); 
send_cmd(0xcc81); send_data(0x26); 
send_cmd(0xcc82); send_data(0x09); 
send_cmd(0xcc83); send_data(0x0B); 
send_cmd(0xcc84); send_data(0x01); 
send_cmd(0xcc85); send_data(0x25); 
send_cmd(0xcc86); send_data(0x00); 
send_cmd(0xcc87); send_data(0x00); 
send_cmd(0xcc88); send_data(0x00); 
send_cmd(0xcc89); send_data(0x00);
send_cmd(0xcc90); send_data(0x00); 
send_cmd(0xcc91); send_data(0x00); 
send_cmd(0xcc92); send_data(0x00); 
send_cmd(0xcc93); send_data(0x00); 
send_cmd(0xcc94); send_data(0x00); 
send_cmd(0xcc95); send_data(0x00); 
send_cmd(0xcc96); send_data(0x00); 
send_cmd(0xcc97); send_data(0x00); 
send_cmd(0xcc98); send_data(0x00); 
send_cmd(0xcc99); send_data(0x00); 
send_cmd(0xcc9a); send_data(0x00); 
send_cmd(0xcc9b); send_data(0x26); 
send_cmd(0xcc9c); send_data(0x0A); 
send_cmd(0xcc9d); send_data(0x0C); 
send_cmd(0xcc9e); send_data(0x02);
send_cmd(0xcca0); send_data(0x25); 
send_cmd(0xcca1); send_data(0x00); 
send_cmd(0xcca2); send_data(0x00); 
send_cmd(0xcca3); send_data(0x00); 
send_cmd(0xcca4); send_data(0x00); 
send_cmd(0xcca5); send_data(0x00); 
send_cmd(0xcca6); send_data(0x00); 
send_cmd(0xcca7); send_data(0x00); 
send_cmd(0xcca8); send_data(0x00); 
send_cmd(0xcca9); send_data(0x00); 
send_cmd(0xccaa); send_data(0x00); 
send_cmd(0xccab); send_data(0x00); 
send_cmd(0xccac); send_data(0x00); 
send_cmd(0xccad); send_data(0x00); 
send_cmd(0xccae); send_data(0x00);
send_cmd(0xccb0); send_data(0x00); 
send_cmd(0xccb1); send_data(0x25); 
send_cmd(0xccb2); send_data(0x0C); 
send_cmd(0xccb3); send_data(0x0A); 
send_cmd(0xccb4); send_data(0x02); 
send_cmd(0xccb5); send_data(0x26); 
send_cmd(0xccb6); send_data(0x00); 
send_cmd(0xccb7); send_data(0x00); 
send_cmd(0xccb8); send_data(0x00); 
send_cmd(0xccb9); send_data(0x00);
send_cmd(0xccc0); send_data(0x00); 
send_cmd(0xccc1); send_data(0x00); 
send_cmd(0xccc2); send_data(0x00); 
send_cmd(0xccc3); send_data(0x00); 
send_cmd(0xccc4); send_data(0x00); 
send_cmd(0xccc5); send_data(0x00); 
send_cmd(0xccc6); send_data(0x00); 
send_cmd(0xccc7); send_data(0x00); 
send_cmd(0xccc8); send_data(0x00); 
send_cmd(0xccc9); send_data(0x00); 
send_cmd(0xccca); send_data(0x00); 
send_cmd(0xcccb); send_data(0x25); 
send_cmd(0xcccc); send_data(0x0B); 
send_cmd(0xcccd); send_data(0x09); 
send_cmd(0xccce); send_data(0x01);
send_cmd(0xccd0); send_data(0x26); 
send_cmd(0xccd1); send_data(0x00); 
send_cmd(0xccd2); send_data(0x00); 
send_cmd(0xccd3); send_data(0x00); 
send_cmd(0xccd4); send_data(0x00); 
send_cmd(0xccd5); send_data(0x00); 
send_cmd(0xccd6); send_data(0x00); 
send_cmd(0xccd7); send_data(0x00); 
send_cmd(0xccd8); send_data(0x00); 
send_cmd(0xccd9); send_data(0x00); 
send_cmd(0xccda); send_data(0x00); 
send_cmd(0xccdb); send_data(0x00); 
send_cmd(0xccdc); send_data(0x00); 
send_cmd(0xccdd); send_data(0x00); 
send_cmd(0xccde); send_data(0x00); 

send_cmd(0x4400); send_data(0x00);
send_cmd(0x4401); send_data(0x0E);

send_cmd(0x3A00); send_data(0x66); 
send_cmd(0x3500); send_data(0x00);

send_cmd(0x3600); send_data(0x00);//0xc0  180

//send_cmd(0x2100);
send_cmd(0x1100);
Delayms(150);
send_cmd(0x2900);
Delayms(200);

send_cmd(0x2A00); send_data(0x00);
send_cmd(0x2A01); send_data(0x00);
send_cmd(0x2A02); send_data(0x01);
send_cmd(0x2A03); send_data(0xDF);
send_cmd(0x2B00); send_data(0x00);
send_cmd(0x2B01); send_data(0x00);
send_cmd(0x2B02); send_data(0x03);  
send_cmd(0x2B03); send_data(0x1F);
send_cmd(0x2C00);

        sw_clear_panel(0x00);
        MDELAY(10);
}
static void init_lcm_registers(void)
{
    unsigned int data_array[16];


    //*************Enable TE  *******************//
    data_array[0]= 0x00053902;
    data_array[1]= 0x2555aaff;
    data_array[2]= 0x00000001;
    dsi_set_cmdq(data_array, 3, 1);

    data_array[0]= 0x00093902;
    data_array[1]= 0x000201f8;
    data_array[2]= 0x00133320;
    data_array[3]= 0x00000048;
    dsi_set_cmdq(data_array, 4, 1);
    
    //*************Enable CMD2 Page1  *******************//
    data_array[0]=0x00063902;
    data_array[1]=0x52aa55f0;
    data_array[2]=0x00000108;
    dsi_set_cmdq(data_array, 3, 1);
    
    //************* AVDD: manual  *******************//
    data_array[0]=0x00043902;
    data_array[1]=0x0d0d0db0;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x343434b6;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x0d0d0db1;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x343434b7;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x000000b2;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x242424b8;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00023902;
    data_array[1]=0x000001bf;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x0f0f0fb3;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x343434b9;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x080808b5;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00023902;
    data_array[1]=0x000003c2;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x242424ba;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x007800bc;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x007800bd;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00033902;
    data_array[1]=0x006400be;
    dsi_set_cmdq(data_array, 2, 1);
    
    //*************Gamma Table  *******************//
    data_array[0]=0x00353902;
    data_array[1]=0x003300D1;
    data_array[2]=0x003A0034;
    data_array[3]=0x005C004A;
    data_array[4]=0x00A60081;
    data_array[5]=0x011301E5;
    data_array[6]=0x01820154;
    data_array[7]=0x020002CA;
    data_array[8]=0x02340201;
    data_array[9]=0x02840267;
    data_array[10]=0x02B702A4;
    data_array[11]=0x02DE02CF;
    data_array[12]=0x03FE02F2;
    data_array[13]=0x03330310;
    data_array[14]=0x0000006D;
    dsi_set_cmdq(data_array, 15, 1);
    
    data_array[0]=0x00353902;
    data_array[1]=0x003300D2;
    data_array[2]=0x003A0034;
    data_array[3]=0x005C004A;
    data_array[4]=0x00A60081;
    data_array[5]=0x011301E5;
    data_array[6]=0x01820154;
    data_array[7]=0x020002CA;
    data_array[8]=0x02340201;
    data_array[9]=0x02840267;
    data_array[10]=0x02B702A4;
    data_array[11]=0x02DE02CF;
    data_array[12]=0x03FE02F2;
    data_array[13]=0x03330310;
    data_array[14]=0x0000006D;
    dsi_set_cmdq(data_array, 15, 1);
    
    data_array[0]=0x00353902;
    data_array[1]=0x003300D3;
    data_array[2]=0x003A0034;
    data_array[3]=0x005C004A;
    data_array[4]=0x00A60081;
    data_array[5]=0x011301E5;
    data_array[6]=0x01820154;
    data_array[7]=0x020002CA;
    data_array[8]=0x02340201;
    data_array[9]=0x02840267;
    data_array[10]=0x02B702A4;
    data_array[11]=0x02DE02CF;
    data_array[12]=0x03FE02F2;
    data_array[13]=0x03330310;
    data_array[14]=0x0000006D;
    dsi_set_cmdq(data_array, 15, 1);
    
    data_array[0]=0x00353902;
    data_array[1]=0x003300D4;
    data_array[2]=0x003A0034;
    data_array[3]=0x005C004A;
    data_array[4]=0x00A60081;
    data_array[5]=0x011301E5;
    data_array[6]=0x01820154;
    data_array[7]=0x020002CA;
    data_array[8]=0x02340201;
    data_array[9]=0x02840267;
    data_array[10]=0x02B702A4;
    data_array[11]=0x02DE02CF;
    data_array[12]=0x03FE02F2;
    data_array[13]=0x03330310;
    data_array[14]=0x0000006D;
    dsi_set_cmdq(data_array, 15, 1);
    
    data_array[0]=0x00353902;
    data_array[1]=0x003300D5;
    data_array[2]=0x003A0034;
    data_array[3]=0x005C004A;
    data_array[4]=0x00A60081;
    data_array[5]=0x011301E5;
    data_array[6]=0x01820154;
    data_array[7]=0x020002CA;
    data_array[8]=0x02340201;
    data_array[9]=0x02840267;
    data_array[10]=0x02B702A4;
    data_array[11]=0x02DE02CF;
    data_array[12]=0x03FE02F2;
    data_array[13]=0x03330310;
    data_array[14]=0x0000006D;
    dsi_set_cmdq(data_array, 15, 1);
    
    data_array[0]=0x00353902;
    data_array[1]=0x003300D6;
    data_array[2]=0x003A0034;
    data_array[3]=0x005C004A;
    data_array[4]=0x00A60081;
    data_array[5]=0x011301E5;
    data_array[6]=0x01820154;
    data_array[7]=0x020002CA;
    data_array[8]=0x02340201;
    data_array[9]=0x02840267;
    data_array[10]=0x02B702A4;
    data_array[11]=0x02DE02CF;
    data_array[12]=0x03FE02F2;
    data_array[13]=0x03330310;
    data_array[14]=0x0000006D;
    dsi_set_cmdq(data_array, 15, 1);
    MDELAY(10);

    // ********************  EABLE CMD2 PAGE 0 **************//
    data_array[0]=0x00063902;
    data_array[1]=0x52aa55f0;
    data_array[2]=0x00000008;
    dsi_set_cmdq(data_array, 3, 1);

    // ********************  EABLE DSI TE **************//
    data_array[0]=0x00033902;
    data_array[1]=0x0000fcb1;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00023902;
    data_array[1]=0x000005b6;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00033902;
    data_array[1]=0x007070b7;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00053902;
    data_array[1]=0x030301b8;
    data_array[2]=0x00000003;
    dsi_set_cmdq(data_array, 3, 1);
    
    data_array[0]=0x00043902;
    data_array[1]=0x000002bc;
    dsi_set_cmdq(data_array, 2, 1);
    
    data_array[0]=0x00063902;
    data_array[1]=0x5002d0c9;
    data_array[2]=0x00005050;
    dsi_set_cmdq(data_array, 3, 1);
    
    // ********************  EABLE DSI TE packet **************//
    data_array[0]=0x00351500;
    dsi_set_cmdq(data_array, 1, 1);
    
    data_array[0]=0x773a1500;
    dsi_set_cmdq(data_array, 1, 1);
    
    data_array[0]= 0x00053902;
    data_array[1]= 0x0100002a;
    data_array[2]= 0x000000df;
    dsi_set_cmdq(data_array, 3, 1);
    
    data_array[0]= 0x00053902;
    data_array[1]= 0x0300002b;
    data_array[2]= 0x00000055;
    dsi_set_cmdq(data_array, 3, 1);

    data_array[0] = 0x00110500;
    dsi_set_cmdq(data_array, 1, 1);
    MDELAY(120);
    
    data_array[0]= 0x00290500;
    dsi_set_cmdq(data_array, 1, 1);
}
Esempio n. 4
0
static void init_lcm_registers(void)
{
    set_lcm_register(0x00, 0x0000);
    set_lcm_register(0x01, 0x0100);
    set_lcm_register(0x03, 0x1030);
    set_lcm_register(0x02, 0x0700);    
    set_lcm_register(0x04, 0x0000);
    set_lcm_register(0x08, 0x0207);
    set_lcm_register(0x09, 0x0000);
    set_lcm_register(0x0A, 0x0000);     // FMARK function

    set_lcm_register(0x0C, 0x0000);     // MCU interface setting
    set_lcm_register(0x0D, 0x0000);     // Frame marker Position
    set_lcm_register(0x0F, 0x0000);     // MCU interface polarity

    set_lcm_register(0x07, 0x0101);

    // ----------- Power On sequence -----------
    
    set_lcm_register(0x10, 0x10B0);     // SAP, BT[3:0], AP, DSTB, SLP, STB
    MDELAY(POWER_ON_SEQ_DELAY);
    set_lcm_register(0x11, 0x0007);     // DC1[2:0], DC0[2:0], VC[2:0]
    MDELAY(POWER_ON_SEQ_DELAY);
    set_lcm_register(0x17, 0x0001);
    MDELAY(POWER_ON_SEQ_DELAY);
    set_lcm_register(0x12, 0x01B9);     // VREG1OUT voltage
    MDELAY(POWER_ON_SEQ_DELAY);
    set_lcm_register(0x13, 0x0A00);     // VDV[4:0] for VCOM amplitude
    MDELAY(POWER_ON_SEQ_DELAY);
    set_lcm_register(0x29, 0x0006);     // VCM[4:0] for VCOMH
    MDELAY(POWER_ON_SEQ_DELAY);

    // ----------- Adjust the Gamma  Curve -----------
    
    set_lcm_register(0x30, 0x0002);      
    set_lcm_register(0x31, 0x0720);      
    set_lcm_register(0x32, 0x0924);
    set_lcm_register(0x33, 0x3f10);
    set_lcm_register(0x34, 0x3d06);
    set_lcm_register(0x35, 0x1003);      
    set_lcm_register(0x36, 0x0507);      
    set_lcm_register(0x37, 0x0411);      
    set_lcm_register(0x38, 0x0005);      
    set_lcm_register(0x39, 0x0003);
    set_lcm_register(0x3A, 0x0805);
    set_lcm_register(0x3B, 0x0b02);
    set_lcm_register(0x3C, 0x040f);      
    set_lcm_register(0x3D, 0x050c);
    set_lcm_register(0x3E, 0x0103);
    set_lcm_register(0x3F, 0x0401);  

    // ----------- Set GRAM area -----------
    
    set_lcm_register(0x50, 0x0000);      // Horizontal GRAM Start Address
    set_lcm_register(0x51, 0x00EF);      // Horizontal GRAM End Address
    set_lcm_register(0x52, 0x0000);      // Vertical GRAM Start Address
    set_lcm_register(0x53, 0x013F);      // Vertical GRAM Start Address

      
    set_lcm_register(0x60, 0x2700);      // Gate Scan Line
    set_lcm_register(0x61, 0x0001);      // NDL,VLE, REV
    set_lcm_register(0x6A, 0x0000);      // set scrolling line

    // ----------- Partial Display Control -----------
    
    set_lcm_register(0x80, 0x0000);
    set_lcm_register(0x81, 0x0000);
    set_lcm_register(0x82, 0x0000);
    set_lcm_register(0x83, 0x0000);
    set_lcm_register(0x84, 0x0000);
    set_lcm_register(0x85, 0x0000);

    // ----------- Panel Control -----------
    
    set_lcm_register(0x90, 0x0010);
    set_lcm_register(0x92, 0x0000);
    set_lcm_register(0x93, 0x0103);
    set_lcm_register(0x95, 0x0110);
    set_lcm_register(0x97, 0x0000);
    set_lcm_register(0x98, 0x0000);

    set_lcm_register(0xF0, 0x5408);
    set_lcm_register(0xF2, 0x00DF);     // green, blue point CR
    set_lcm_register(0xF3, 0x0007);
    set_lcm_register(0xF4, 0x001F);
    set_lcm_register(0xF0, 0x0000);

	set_lcm_register(0x07, 0x0173);
	MDELAY(PANEL_CONTROL_DELAY);
}
static void init_lcm_registers(void)
{
    unsigned int data_array[16];

	//{0XB9, 3, {0XFF,0X83,0X89}},
	data_array[0]=0x00043902;
	data_array[1]=0x8983FFB9;
	dsi_set_cmdq(data_array, 2, 1);
	MDELAY(1);


	//{0XBA, 7, {0X41,0X93,0X00,0X16,
	//		0XA4,0X10,0X18}}, 
	data_array[0]=0x00083902;
	data_array[1]=0x009341BA;
	data_array[2]=0x1810A416;
	dsi_set_cmdq(data_array, 3, 1);
	MDELAY(1);

/*
  	{0XB1,19,	{0X00,0X00,0X07,0XE8,
			0X97,0X10,0X11,0XCF,
			0XEF,0X25,0X2D,0X22,
			0X22,0X42,0X01,0X3A,
			0XF7,0X20,0X80}},
*/
	data_array[0]=0x00143902;
	data_array[1]=0x070000B1;
	data_array[2]=0x111097E8;
	data_array[3]=0x2D25EFCF;
	data_array[4]=0x01422222;
	data_array[5]=0x8020F73A;
	dsi_set_cmdq(data_array, 6, 1);
	MDELAY(1);


	//{0XC6, 1, {0X08}},
	data_array[0]=0x00023902;
	data_array[1]=0x000008C6;
	dsi_set_cmdq(data_array, 2, 1);
	MDELAY(1);

	/*{0XB2, 7,   {0X00,0X00,0X78,0X08,0X03,0X3F,0X20}},*/
	data_array[0]=0x00083902;
	data_array[1]=0x780000B2;
	data_array[2]=0x203F0308;
	dsi_set_cmdq(data_array, 3, 1);
	MDELAY(1);



	/*
	{0XB4,23,{0X80,0X08,0X00,0X32,
	  	0X10,0X00,0X00,0X00,
	  	0X00,0X00,0X00,0X00,
	  	0X37,0X0A,0X40,0X04,
	  	0X37,0X0A,0X48,0X14,
	  	0X50,0X58,0X0A}},*/
	data_array[0]=0x00183902;
	data_array[1]=0x000880B4;
	data_array[2]=0x00001032;
	data_array[3]=0x00000000;
	data_array[4]=0x400A3700;
	data_array[5]=0x480A3704;
	data_array[6]=0x0A585014;
	dsi_set_cmdq(data_array, 7, 1);
	MDELAY(1);




	/*{0XD5,29,{0X00,0X00,0X4C,0X00,
		  0X01,0X00,0X00,0X00,
		  0X60,0X00,0X99,0X88,
		  0X99,0X88,0X88,0X32,
		  0X88,0X10,0X88,0X76,
		  0X88,0X54,0X10,0X32,
		  0X88,0X88,0X88,0X88,
		  0X88}},*/
	data_array[0]=0x001E3902;
	data_array[1]=0x4C0000D5;
	data_array[2]=0x00000100;
	data_array[3]=0x99006000;
	data_array[4]=0x88889988;
	data_array[5]=0x88108832;
	data_array[6]=0x10548876;
	data_array[7]=0x88888832;
	data_array[8]=0x00008888;
	dsi_set_cmdq(data_array, 9, 1);
	MDELAY(1);

	/*
	{0XE0,34,		{0X04,0X0C,0X10,0X2D,
			0X34,0X3F,0X15,0X35,
			0X05,0X09,0X0E,0X11,
			0X13,0X13,0X12,0X18,
			0X1C,0X04,0X0C,0X10,
			0X2D,0X34,0X3F,0X15,
			0X35,0X05,0X09,0X0E,
			0X11,0X13,0X13,0X12,
			0X18,0X1C}},*/
	data_array[0]=0x00233902;
	data_array[1]=0x100C04E0;
	data_array[2]=0x153F342D;
	data_array[3]=0x0E090535;
	data_array[4]=0x12131311;
	data_array[5]=0x0C041C18;
	data_array[6]=0x3F342D10;
	data_array[7]=0x09053515;
	data_array[8]=0x1313110E;
	data_array[9]=0x001C1812;
	dsi_set_cmdq(data_array, 10, 1);
	MDELAY(1);

	//{0XCC, 1, {0X02}},
	data_array[0]=0x00023902;
	data_array[1]=0x000002CC;
	dsi_set_cmdq(data_array, 2, 1);
	MDELAY(1);

	//{0XB6, 4,   {0X00,0X8F,0X00,0X8F}},
	data_array[0]=0x00053902;
	data_array[1]=0x00A000B6;
	data_array[2]=0x000000A2;
	dsi_set_cmdq(data_array, 3, 1);


    
    // {0X11, 0,   {0X00}},
	data_array[0] = 0x00110500; // Sleep Out
	dsi_set_cmdq(data_array, 1, 1);
	MDELAY(120);

	//{0X29, 0,   {0X00}},
	data_array[0] = 0x00290500; // Display On
	dsi_set_cmdq(data_array, 1, 1); 
	MDELAY(10);
}
static void init_lcm_registers(void)
{
	unsigned int data_array[16];

	data_array[0] = 0x00053902;
	data_array[1] = 0x2555AAFF;
	data_array[2] = 0x00000001;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00093902;
	data_array[1] = 0x000201F8;
	data_array[2] = 0x00133320;
	data_array[3] = 0x00000048;
	dsi_set_cmdq(data_array, 4, 1);

	data_array[0] = 0x00063902;
	data_array[1] = 0x52AA55F0;
	data_array[2] = 0x00000108;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x0D0D0DB0;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x343434B6;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x0D0D0DB1;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x343434B7;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x000000B2;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x242424B8;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00023902;
	data_array[1] = 0x000001BF;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x0F0F0FB3;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x343434B9;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x080808B5;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00023902;
	data_array[1] = 0x000003C2;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x242424BA;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x007800BC;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x007800BD;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00033902;
	data_array[1] = 0x006400BE;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x003300D1;
	data_array[2] = 0x003A0034;
	data_array[3] = 0x005C004A;
	data_array[4] = 0x00A60081;
	data_array[5] = 0x011301E5;
	data_array[6] = 0x01820154;
	data_array[7] = 0x020002CA;
	data_array[8] = 0x02340201;
	data_array[9] = 0x02840267;
	data_array[10] = 0x02B702A4;
	data_array[11] = 0x02DE02CF;
	data_array[12] = 0x03FE02F2;
	data_array[13] = 0x03330310;
	data_array[14] = 0x0000006D;
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x003300D2;
	data_array[2] = 0x003A0034;
	data_array[3] = 0x005C004A;
	data_array[4] = 0x00A60081;
	data_array[5] = 0x011301E5;
	data_array[6] = 0x01820154;
	data_array[7] = 0x020002CA;
	data_array[8] = 0x02340201;
	data_array[9] = 0x02840267;
	data_array[10] = 0x02B702A4;
	data_array[11] = 0x02DE02CF;
	data_array[12] = 0x03FE02F2;
	data_array[13] = 0x03330310;
	data_array[14] = 0x0000006D;
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x003300D3;
	data_array[2] = 0x003A0034;
	data_array[3] = 0x005C004A;
	data_array[4] = 0x00A60081;
	data_array[5] = 0x011301E5;
	data_array[6] = 0x01820154;
	data_array[7] = 0x020002CA;
	data_array[8] = 0x02340201;
	data_array[9] = 0x02840267;
	data_array[10] = 0x02B702A4;
	data_array[11] = 0x02DE02CF;
	data_array[12] = 0x03FE02F2;
	data_array[13] = 0x03330310;
	data_array[14] = 0x0000006D;
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x003300D4;
	data_array[2] = 0x003A0034;
	data_array[3] = 0x005C004A;
	data_array[4] = 0x00A60081;
	data_array[5] = 0x011301E5;
	data_array[6] = 0x01820154;
	data_array[7] = 0x020002CA;
	data_array[8] = 0x02340201;
	data_array[9] = 0x02840267;
	data_array[10] = 0x02B702A4;
	data_array[11] = 0x02DE02CF;
	data_array[12] = 0x03FE02F2;
	data_array[13] = 0x03330310;
	data_array[14] = 0x0000006D;
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x003300D5;
	data_array[2] = 0x003A0034;
	data_array[3] = 0x005C004A;
	data_array[4] = 0x00A60081;
	data_array[5] = 0x011301E5;
	data_array[6] = 0x01820154;
	data_array[7] = 0x020002CA;
	data_array[8] = 0x02340201;
	data_array[9] = 0x02840267;
	data_array[10] = 0x02B702A4;
	data_array[11] = 0x02DE02CF;
	data_array[12] = 0x03FE02F2;
	data_array[13] = 0x03330310;
	data_array[14] = 0x0000006D;
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x003300D6;
	data_array[2] = 0x003A0034;
	data_array[3] = 0x005C004A;
	data_array[4] = 0x00A60081;
	data_array[5] = 0x011301E5;
	data_array[6] = 0x01820154;
	data_array[7] = 0x020002CA;
	data_array[8] = 0x02340201;
	data_array[9] = 0x02840267;
	data_array[10] = 0x02B702A4;
	data_array[11] = 0x02DE02CF;
	data_array[12] = 0x03FE02F2;
	data_array[13] = 0x03330310;
	data_array[14] = 0x0000006D;
	dsi_set_cmdq(data_array, 15, 1);
	MDELAY(10);

	data_array[0] = 0x00063902;
	data_array[1] = 0x52AA55F0;
	data_array[2] = 0x00000008;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00033902;
	data_array[1] = 0x00007CB1;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00023902;
	data_array[1] = 0x000005B6;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00033902;
	data_array[1] = 0x007070B7;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00053902;
	data_array[1] = 0x030301B8;
	data_array[2] = 0x00000003;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x000002BC;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00063902;
	data_array[1] = 0x5002D0C9;
	data_array[2] = 0x00005050;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00351500;
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x773A1500;
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x00110500;
	dsi_set_cmdq(data_array, 1, 1);
	MDELAY(120);

	data_array[0] = 0x00290500;
	dsi_set_cmdq(data_array, 1, 1);
	MDELAY(20);
}
Esempio n. 7
0
static void init_lcm_registers(void)
{
    send_ctrl_cmd(0x1100);//sleep out
    MDELAY(200);

    set_lcm_register(0xC000,0x86);//power control PWCTR1
    set_lcm_register(0xC001,0x00);
    set_lcm_register(0xC002,0x86);
    set_lcm_register(0xC003,0x00);
    set_lcm_register(0xC100,0x45);
    set_lcm_register(0xC200,0x21);
    set_lcm_register(0xC202,0x02);
    set_lcm_register(0xB600,0x30);//SD_OP_SET
    set_lcm_register(0xB602,0x30);
    set_lcm_register(0xB100,0xA7);//wei zeng added
    set_lcm_register(0xC700,0x8F);//vcom
    set_lcm_register(0x3A00,0x06);//SET PIXEL_FORMAT,pre:0x55


    set_lcm_register(0xE000,0x0E);//gamma  GMACTRL1
    set_lcm_register(0xE001,0x14);
    set_lcm_register(0xE002,0x29);
    set_lcm_register(0xE003,0x3A);
    set_lcm_register(0xE004,0x1D);
    set_lcm_register(0xE005,0x30);
    set_lcm_register(0xE006,0x61);
    set_lcm_register(0xE007,0x3D);
    set_lcm_register(0xE008,0x22);
    set_lcm_register(0xE009,0x2A);	
    set_lcm_register(0xE00A,0x87);
    set_lcm_register(0xE00B,0x16);
    set_lcm_register(0xE00C,0x3B);
    set_lcm_register(0xE00D,0x4C);
    set_lcm_register(0xE00E,0x78);
    set_lcm_register(0xE00F,0x96);
    set_lcm_register(0xE010,0x4A);
    set_lcm_register(0xE011,0x4D);

    set_lcm_register(0xE100,0x0E);//GMACTRL2	
    set_lcm_register(0xE101,0x14);
    set_lcm_register(0xE102,0x29);
    set_lcm_register(0xE103,0x3A);
    set_lcm_register(0xE104,0x1D);
    set_lcm_register(0xE105,0x30);
    set_lcm_register(0xE106,0x61);
    set_lcm_register(0xE107,0x3F);
    set_lcm_register(0xE108,0x20);	
    set_lcm_register(0xE109,0x26);
    set_lcm_register(0xE10A,0x83);
    set_lcm_register(0xE10B,0x16);
    set_lcm_register(0xE10C,0x3B);
    set_lcm_register(0xE10D,0x4C);
    set_lcm_register(0xE10E,0x78);
    set_lcm_register(0xE10F,0x96);
    set_lcm_register(0xE110,0x4A);	
    set_lcm_register(0xE111,0x4D);

    set_lcm_register(0xE200,0x0E);//GMACTRL3
    set_lcm_register(0xE201,0x14);
    set_lcm_register(0xE202,0x29);
    set_lcm_register(0xE203,0x3A);
    set_lcm_register(0xE204,0x1D);
    set_lcm_register(0xE205,0x30);
    set_lcm_register(0xE206,0x61);	
    set_lcm_register(0xE207,0x3D);
    set_lcm_register(0xE208,0x22);
    set_lcm_register(0xE209,0x2A);
    set_lcm_register(0xE20A,0x87);
    set_lcm_register(0xE20B,0x16);
    set_lcm_register(0xE20C,0x3B);
    set_lcm_register(0xE20D,0x4C);
    set_lcm_register(0xE20E,0x78);	
    set_lcm_register(0xE20F,0x96);
    set_lcm_register(0xE210,0x4A);
    set_lcm_register(0xE211,0x4D);


    set_lcm_register(0xE300,0x0E);//GMACTRL4
    set_lcm_register(0xE301,0x14);
    set_lcm_register(0xE302,0x29);
    set_lcm_register(0xE303,0x3A);
    set_lcm_register(0xE304,0x1D);	
    set_lcm_register(0xE305,0x30);
    set_lcm_register(0xE306,0x61);
    set_lcm_register(0xE307,0x3F);
    set_lcm_register(0xE308,0x20);
    set_lcm_register(0xE309,0x26);
    set_lcm_register(0xE30A,0x83);
    set_lcm_register(0xE30B,0x16);
    set_lcm_register(0xE30C,0x3B);	
    set_lcm_register(0xE30D,0x4C);
    set_lcm_register(0xE30E,0x78);
    set_lcm_register(0xE30F,0x96);
    set_lcm_register(0xE310,0x4A);
    set_lcm_register(0xE311,0x4D);

    set_lcm_register(0xE400,0x0E);//GMACTRL5
    set_lcm_register(0xE401,0x14);
    set_lcm_register(0xE402,0x29);	
    set_lcm_register(0xE403,0x3A);
    set_lcm_register(0xE404,0x1D);
    set_lcm_register(0xE405,0x30);
    set_lcm_register(0xE406,0x61);
    set_lcm_register(0xE407,0x3D);
    set_lcm_register(0xE408,0x22);
    set_lcm_register(0xE409,0x2A);
    set_lcm_register(0xE40A,0x87);	
    set_lcm_register(0xE40B,0x16);
    set_lcm_register(0xE40C,0x3B);
    set_lcm_register(0xE40D,0x4C);
    set_lcm_register(0xE40E,0x78);
    set_lcm_register(0xE40F,0x96);
    set_lcm_register(0xE410,0x4A);
    set_lcm_register(0xE411,0x4D);


    set_lcm_register(0xE500,0x0E);
    set_lcm_register(0xE501,0x14);
    set_lcm_register(0xE502,0x29);	
    set_lcm_register(0xE503,0x3A);
    set_lcm_register(0xE504,0x1D);
    set_lcm_register(0xE505,0x30);
    set_lcm_register(0xE506,0x61);
    set_lcm_register(0xE507,0x3F);
    set_lcm_register(0xE508,0x20);
    set_lcm_register(0xE509,0x26);
    set_lcm_register(0xE50A,0x83);	
    set_lcm_register(0xE50B,0x16);
    set_lcm_register(0xE50C,0x3B);
    set_lcm_register(0xE50D,0x4C);
    set_lcm_register(0xE50E,0x78);
    set_lcm_register(0xE50F,0x96);
    set_lcm_register(0xE510,0x4A);
    set_lcm_register(0xE511,0x4D);

	// enable tering free
	set_lcm_register(0x3500,0x02);

    set_lcm_register(0x3600,0x00);
    send_ctrl_cmd(0x2900);
    MDELAY(200);
    send_ctrl_cmd(0x2C00);//wei zeng

}
Esempio n. 8
0
static void init_lcm_registers(void)
{
    // FROM 9K0804
    send_ctrl_cmd(0X0011);
    MDELAY(20);
    
    send_ctrl_cmd(0X00D0);  // Power_Setting (D0h)
    send_data_cmd(0X0007);
    send_data_cmd(0X0042);
    send_data_cmd(0X001B);
    send_ctrl_cmd(0X00D1);  // VCOM Control (D1h)
    send_data_cmd(0X0000);
    send_data_cmd(0X0025);
    send_data_cmd(0X0012);
    send_ctrl_cmd(0X00D2);  // Power_Setting for Normal Mode
    send_data_cmd(0X0001);
    send_data_cmd(0X0011);
    send_ctrl_cmd(0X00C0);  // Panel Driving Setting (C0h)
    send_data_cmd(0X0010);
    send_data_cmd(0X003B);
    send_data_cmd(0X0000);
    send_data_cmd(0X0012);
    send_data_cmd(0X0001);
    send_ctrl_cmd(0X00C1);
    send_data_cmd(0X0010);
    send_data_cmd(0X0013);
    send_data_cmd(0X0088);
    // xuecheng, lcm fps setting
    // 0x001 for 125hz
    send_ctrl_cmd(0X00C5);
    send_data_cmd(0X0000);
    
    send_ctrl_cmd(0X00C8);
    send_data_cmd(0X0002);
    send_data_cmd(0X0046);
    send_data_cmd(0X0014);
    send_data_cmd(0X0031);
    send_data_cmd(0X000A);
    send_data_cmd(0X0004);
    send_data_cmd(0X0037);
    send_data_cmd(0X0024);
    send_data_cmd(0X0057);
    send_data_cmd(0X0013);
    send_data_cmd(0X0006);
    send_data_cmd(0X000C);
    send_ctrl_cmd(0X0036);
    send_data_cmd(0X000A);
    send_ctrl_cmd(0X003A);
    send_data_cmd(0X0005);
    send_ctrl_cmd(0X002A);
    send_data_cmd(0X0000);
    send_data_cmd(0X0000);
    send_data_cmd(0X0001);
    send_data_cmd(0X003F);
    send_ctrl_cmd(0X002B);
    send_data_cmd(0X0000);
    send_data_cmd(0X0000);
    send_data_cmd(0X0001);
    send_data_cmd(0X00DF);
    MDELAY(120);

    send_ctrl_cmd(0X0029);
}
static void lcm_init(void)
{
	unsigned int data_array[16];    
	SET_RESET_PIN(1);
	MDELAY(20);
	SET_RESET_PIN(0);
	MDELAY(20);
	SET_RESET_PIN(1);
	MDELAY(50);

	data_array[0]=0x00053902;
	data_array[1]=0x2555aaff;
	data_array[2]=0x00000001;
	dsi_set_cmdq(&data_array,3,1);

	data_array[0]=0x00363902;
	data_array[1]=0x4A0000F2;
	data_array[2]=0x0000A80A;
	data_array[3]=0x00000000;
	data_array[4]=0x00000000;
	data_array[5]=0x000B0000;
	data_array[6]=0x00000000;
	data_array[7]=0x00000000;
	data_array[8]=0x51014000;
	data_array[9]=0x01000100;
	dsi_set_cmdq(&data_array,10,1);

	data_array[0]=0x00083902;
	data_array[1]=0x070302F3;
	data_array[2]=0x0DD18845;
	dsi_set_cmdq(&data_array,3,1);
	//page 0

	data_array[0]=0x00063902;
	data_array[1]=0x52AA55F0;
	data_array[2]=0x00000008;
	dsi_set_cmdq(&data_array,3,1);

	data_array[0]=0x00043902;
	data_array[1]=0x0000CCB1;	
	dsi_set_cmdq(&data_array,2,1);
/*
	data_array[0]=0x05B61500;
	dsi_set_cmdq(&data_array,1,1);

	data_array[0]=0x00023902;
	data_array[1]=0x007272B7;
	dsi_set_cmdq(&data_array,2,1);
*/
	data_array[0]=0x00053902;
	data_array[1]=0x020201B8;
	data_array[2]=0x00000002;
	dsi_set_cmdq(&data_array,3,1);
/*
	data_array[0]=0x33BB1500;
	dsi_set_cmdq(&data_array,1,1);

	data_array[0]=0x00043902;
	data_array[1]=0x000004BC;
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00063902;
	data_array[1]=0x104E01BD;
	data_array[2]=0x00000120;
	//data_array[1]=0x084101BD;
	//data_array[2]=0x00000140;
	dsi_set_cmdq(&data_array,3,1);
*/
	data_array[0]=0x00073902;
	data_array[1]=0x0D0653C9;
	data_array[2]=0x0000171a;
	dsi_set_cmdq(&data_array,3,1);

/////////////page 1


	
  data_array[0]=0x00063902;
	data_array[1]=0x52AA55F0;        //page 1
	data_array[2]=0x00000108;
	dsi_set_cmdq(&data_array,3,1);

	data_array[0]=0x00043902;
	data_array[1]=0x050505B0;		//AVDD: 5.5V
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;
	data_array[1]=0x050505B1;		// AVEE: -5.5V
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;
	data_array[1]=0x010101B2;		// VCL: -4.0V
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;
	data_array[1]=0x0d0d0dB3;		// VGH: 14V
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;
	data_array[1]=0x090909B4;		// VGLX: -12.0V
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;
	data_array[1]=0x444444B6;		// AVDD: 3.0x
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;
	data_array[1]=0x444444B7;		// AVEE: -2.0x
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;
	data_array[1]=0x131313B8;		// VCL: -2.0x
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;		//VGH: AVDD - AVEE + VDDB
	data_array[1]=0x242424B9;
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;
	data_array[1]=0x242424BA;		// VGLX: AVEE + VCL - AVDD0
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;
	data_array[1]=0x008000BC;	// VGMP: 5.0V, VGSP: 0.3V   0x98
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00043902;
	data_array[1]=0x008000BD;	// VGMN: -5.0V, VGSN: -0.3V
	dsi_set_cmdq(&data_array,2,1);

	//data_array[0]=0x01Bf1500;	
	//dsi_set_cmdq(&data_array,1,1);

	data_array[0]=0x43Be1500;	
	dsi_set_cmdq(&data_array,1,1);

	data_array[0]=0x00033902;
	data_array[1]=0x000004C0;	
	dsi_set_cmdq(&data_array,2,1);

	data_array[0]=0x00ca1500;	
	dsi_set_cmdq(&data_array,1,1);
		data_array[0]=0x04cf1500;	
	dsi_set_cmdq(&data_array,1,1);


	
	data_array[0]=0x00C21500;	
	dsi_set_cmdq(&data_array,1,1);
	/*GAMMA SETTINGS*/
  
        data_array[0]=0x00053902;
        data_array[1]=0x0d1006D0;
        data_array[2]=0x0000000f;
        dsi_set_cmdq(&data_array,3,1);

        data_array[0]=0x00113902;
        data_array[1]=0x001600D1;
        data_array[2]=0x003e0023;
        data_array[3]=0x00720058;
        data_array[4]=0x00a90095;
        data_array[5]=0x000000e0;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x001600D5;
        data_array[2]=0x003e0023;
        data_array[3]=0x00720058;
        data_array[4]=0x00a90095;
        data_array[5]=0x000000e0;
        dsi_set_cmdq(&data_array,6,1);

                data_array[0]=0x00113902;
        data_array[1]=0x001600D9;
        data_array[2]=0x003e0023;
        data_array[3]=0x00720058;
        data_array[4]=0x00a90095;
        data_array[5]=0x000000e0;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x001600e0;
        data_array[2]=0x003e0023;
        data_array[3]=0x00720058;
        data_array[4]=0x00a90095;
        data_array[5]=0x000000e0;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x001600e4;
        data_array[2]=0x003e0023;
        data_array[3]=0x00720058;
        data_array[4]=0x00a90095;
        data_array[5]=0x000000e0;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x001600e8;
        data_array[2]=0x003e0023;
        data_array[3]=0x00720058;
        data_array[4]=0x00a90095;
        data_array[5]=0x000000e0;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x010601D2;
        data_array[2]=0x01710141;
        data_array[3]=0x01FA01bb;
        data_array[4]=0x023902fc;
        data_array[5]=0x0000007e;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x010601D6;
        data_array[2]=0x01710141;
        data_array[3]=0x01FA01bb;
        data_array[4]=0x023902fc;
        data_array[5]=0x0000007e;
        dsi_set_cmdq(&data_array,6,1);
        
        data_array[0]=0x00113902;
        data_array[1]=0x010601Dd;
        data_array[2]=0x01710141;
        data_array[3]=0x01FA01bb;
        data_array[4]=0x023902fc;
        data_array[5]=0x0000007e;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x010601e1;
        data_array[2]=0x01710141;
        data_array[3]=0x01FA01bb;
        data_array[4]=0x023902fc;
        data_array[5]=0x0000007e;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x010601e5;
        data_array[2]=0x01710141;
        data_array[3]=0x01FA01bb;
        data_array[4]=0x023902fc;
        data_array[5]=0x0000007e;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x010601e9;
        data_array[2]=0x01710141;
        data_array[3]=0x01FA01bb;
        data_array[4]=0x023902fc;
        data_array[5]=0x0000007e;
        dsi_set_cmdq(&data_array,6,1);

        
        data_array[0]=0x00113902;
        data_array[1]=0x02a402D3;
        data_array[2]=0x030403e0;
        data_array[3]=0x0363033d;
        data_array[4]=0x03ad038e;
        data_array[5]=0x000000c8;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x02a402D7;
        data_array[2]=0x030403e0;
        data_array[3]=0x0363033d;
        data_array[4]=0x03ad038e;
        data_array[5]=0x000000c8;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x02a402De;
        data_array[2]=0x030403e0;
        data_array[3]=0x0363033d;
        data_array[4]=0x03ad038e;
        data_array[5]=0x000000c8;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x02a402e2;
        data_array[2]=0x030403e0;
        data_array[3]=0x0363033d;
        data_array[4]=0x03ad038e;
        data_array[5]=0x000000c8;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x02a402e6;
        data_array[2]=0x030403e0;
        data_array[3]=0x0363033d;
        data_array[4]=0x03ad038e;
        data_array[5]=0x000000c8;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00113902;
        data_array[1]=0x02a402ea;
        data_array[2]=0x030403e0;
        data_array[3]=0x0363033d;
        data_array[4]=0x03ad038e;
        data_array[5]=0x000000c8;
        dsi_set_cmdq(&data_array,6,1);

        data_array[0]=0x00053902;
        data_array[1]=0x03f103D4;
        data_array[2]=0x000000ff;
        dsi_set_cmdq(&data_array,3,1);

        data_array[0]=0x00053902;
        data_array[1]=0x03f103D8;
        data_array[2]=0x000000ff;
        dsi_set_cmdq(&data_array,3,1);

        data_array[0]=0x00053902;
        data_array[1]=0x03f103df;
        data_array[2]=0x000000ff;
        dsi_set_cmdq(&data_array,3,1);

        data_array[0]=0x00053902;
        data_array[1]=0x03f103e3;
        data_array[2]=0x000000ff;
        dsi_set_cmdq(&data_array,3,1);

        data_array[0]=0x00053902;
        data_array[1]=0x03f103e7;
        data_array[2]=0x000000ff;
        dsi_set_cmdq(&data_array,3,1);

        data_array[0]=0x00053902;
        data_array[1]=0x03f103eb;
        data_array[2]=0x000000ff;
        dsi_set_cmdq(&data_array,3,1);

        
	/*GAMMA SETTINGS END*/
	


	data_array[0]=0x773A1500;
	dsi_set_cmdq(&data_array,1,1);

    data_array[0]=0x00361500;
	dsi_set_cmdq(&data_array,1,1);

	data_array[0]=0x00351500;
	dsi_set_cmdq(&data_array,1,1);

	data_array[0]=0x00110500;
	dsi_set_cmdq(&data_array,1,1);
	MDELAY(20);

	data_array[0]=0x00291500;
	dsi_set_cmdq(&data_array,1,1);
	
	data_array[0]=0x00320500;
	dsi_set_cmdq(&data_array,1,1);		
	MDELAY(150);
}
static void init_lcm_registers(void)
{
	unsigned int i = 0;

		send_ctrl_cmd(0xB9);//B9
		send_data_cmd(0xFF);
		send_data_cmd(0x83);
		send_data_cmd(0x69);
	MDELAY(10);		
		send_ctrl_cmd(0xB1);//B1
		send_data_cmd(0x01);
		send_data_cmd(0x00);
		send_data_cmd(0x44);
		send_data_cmd(0x0a);
		send_data_cmd(0x00);
		send_data_cmd(0x0f);
		send_data_cmd(0x0f);
		send_data_cmd(0x2c);
		send_data_cmd(0x2c);
		send_data_cmd(0x3f);
		send_data_cmd(0x3f);
		send_data_cmd(0x01);
		send_data_cmd(0x23);//
		send_data_cmd(0x01);
		send_data_cmd(0xe6);
		send_data_cmd(0xe6);
		send_data_cmd(0xe6);
		send_data_cmd(0xe6);
		send_data_cmd(0xE6);
		
		send_ctrl_cmd(0xB2);//B2
		send_data_cmd(0x00);
		send_data_cmd(0x10);
		send_data_cmd(0x07);
		send_data_cmd(0x03);
/*		send_data_cmd(0x70);
		send_data_cmd(0x00);
		send_data_cmd(0xFF);
		send_data_cmd(0x00);
		send_data_cmd(0x00);
		send_data_cmd(0x00);
		send_data_cmd(0x00);
		send_data_cmd(0x03);
		send_data_cmd(0x03);
		send_data_cmd(0x00);
		send_data_cmd(0x01);
*/
		send_ctrl_cmd(0xB4);//B4
		send_data_cmd(0x02);
		send_data_cmd(0x1d);
		send_data_cmd(0x80);
		send_data_cmd(0x00);
		send_data_cmd(0x00);
			MDELAY(5);
		send_ctrl_cmd(0xB6);  // SET VCOM
		send_data_cmd(0x53);  
		send_data_cmd(0x53);  
		
		//屏倒置使用需设置RCC=0A,R36=10 ,如果正放,设置RCC=02H.
	  send_ctrl_cmd(0xCC);  // SS=1,REV=1
	  send_data_cmd(0x02);   // 0A

		send_ctrl_cmd(0x36);//36
		send_data_cmd(0x00);
		
		send_ctrl_cmd(0xd5);//D5
		send_data_cmd(0x00);
		send_data_cmd(0x01);
		send_data_cmd(0x03);
		send_data_cmd(0x28);
		send_data_cmd(0x01);
		send_data_cmd(0x04);
		send_data_cmd(0x28);
		send_data_cmd(0x70);//70
		send_data_cmd(0x11);
		send_data_cmd(0x13);
		send_data_cmd(0x00);
		send_data_cmd(0x00);
		send_data_cmd(0x60);
		send_data_cmd(0x04);
		send_data_cmd(0x71);
		send_data_cmd(0x05);
		send_data_cmd(0x00);
		send_data_cmd(0x00);
		send_data_cmd(0x71);
		send_data_cmd(0x05);
		send_data_cmd(0x60);
		send_data_cmd(0x04);
		send_data_cmd(0x07);
		send_data_cmd(0x0F);
		send_data_cmd(0x04);
		send_data_cmd(0x04);
			MDELAY(5);
send_ctrl_cmd(0xE0); // Set Gamma   1
	send_data_cmd(0x00);  
	send_data_cmd(0x01);  
	send_data_cmd(0x0c);  
	send_data_cmd(0x34);  
	send_data_cmd(0x38);  
	send_data_cmd(0x3F);  
	send_data_cmd(0x26);  
	send_data_cmd(0x47);  
	send_data_cmd(0x05);  
	send_data_cmd(0x0e);  
	send_data_cmd(0x11);  
	send_data_cmd(0x15);  
	send_data_cmd(0x17);  
	send_data_cmd(0x15);  
	send_data_cmd(0x16);  
	send_data_cmd(0x11);  
	send_data_cmd(0x17); 
 
	send_data_cmd(0x00);  
	send_data_cmd(0x01);  
	send_data_cmd(0x0c);  
	send_data_cmd(0x34);  
	send_data_cmd(0x38);  
	send_data_cmd(0x3F);  
	send_data_cmd(0x26);  
	send_data_cmd(0x47);  
	send_data_cmd(0x05);  
	send_data_cmd(0x0e);  
	send_data_cmd(0x11);  
	send_data_cmd(0x15);  
	send_data_cmd(0x17);  
	send_data_cmd(0x15);  
	send_data_cmd(0x16);  
	send_data_cmd(0x11);  
	send_data_cmd(0x17);
		
		
		/*
		////////////////////16bits///////////////////
				 send_ctrl_cmd(0x2d);//SET LUT
				 for(i=0;i<=63;i++)
				  send_data_cmd(i*8);
		         for(i=0;i<=63;i++)
				  send_data_cmd(i*4);
				  for(i=0;i<=63;i++)
				  send_data_cmd(i*8);
		*/
		
		////////////////////18bits///////////////////
		 send_ctrl_cmd(0x2D); //Look up table// 
		     
		 for(i=0;i<64;i++)
		   send_data_cmd(4*i);//RED  
		 for(i=0;i<64;i++)
		   send_data_cmd(4*i);//Green 
		 for(i=0;i<64;i++)
		   send_data_cmd(4*i);//Blue*/
		  
		 
		
		MDELAY(10);
		
		send_ctrl_cmd(0x3A);
		send_data_cmd(0x66);
		
			
		send_ctrl_cmd(0x11); //Sleep Out
		MDELAY(150);
	
	
		send_ctrl_cmd(0x29); //Display On
		MDELAY(20);
		
				  
		send_ctrl_cmd(0x2C);	 

}
static void lcm_suspend(void)
{
	send_ctrl_cmd(0x0028); 
      	send_ctrl_cmd(0x0010); 
      	MDELAY(200);
}
Esempio n. 12
0
static void init_lcm_registers(void)
{

#if 1  
     send_ctrl_cmd(0xCF);	// EXTC Option
    send_data_cmd(0x00);
    send_data_cmd(0x21);
     send_data_cmd(0x20);

    send_ctrl_cmd(0xF2); // 3-Gamma Function Off
    send_data_cmd(0x02);

     send_ctrl_cmd(0xB4); // Inversion Control -> 2Dot inversion
     send_data_cmd(0x02);

     send_ctrl_cmd(0xC0); // Powr control 1
    send_data_cmd(0x15);
    send_data_cmd(0x15);

     send_ctrl_cmd(0xC1); // Power control 2
    send_data_cmd(0x05);

     send_ctrl_cmd(0xC2);	// Powr control 3
     send_data_cmd(0x32);

     send_ctrl_cmd(0xC5);	// Vcom control 1
     send_data_cmd(0xFC);

    send_ctrl_cmd(0xCB);   // V-core Setting
    send_data_cmd(0x31);
    send_data_cmd(0x24);
    send_data_cmd(0x00);
    send_data_cmd(0x34);

     send_ctrl_cmd(0xF6);	// Interface control
     send_data_cmd(0x41);
    send_data_cmd(0x00);
     send_data_cmd(0x00);

     send_ctrl_cmd(0xB7);	// Entry Mode Set
     send_data_cmd(0x06);

     send_ctrl_cmd(0xB1);	// Frame Rate Control
     send_data_cmd(0x00);
    send_data_cmd(0x1B);

     send_ctrl_cmd(0x36);	// Memory Access Control
     send_data_cmd(0x08); // seosc 08 -> C8

     send_ctrl_cmd(0xB5);	// Blanking Porch control
     send_data_cmd(0x02);
     send_data_cmd(0x02);
     send_data_cmd(0x0A);
     send_data_cmd(0x14);

     send_ctrl_cmd(0xB6);	// Display Function control
     send_data_cmd(0x0A);
    send_data_cmd(0x82);
     send_data_cmd(0x27);
    send_data_cmd(0x00);

     send_ctrl_cmd(0x3A);	// Pixel Format->DBI(5=16bit)
    send_data_cmd(0x05);

     send_ctrl_cmd(0x35);	// Tearing Effect Line On
     send_data_cmd(0x00);

     send_ctrl_cmd(0x44);	// Tearing Effect Control Parameter
     send_data_cmd(0x00);
     send_data_cmd(0xEF);

     send_ctrl_cmd(0xE0);	// Positive Gamma Correction
    send_data_cmd(0x00);
    send_data_cmd(0x06);
     send_data_cmd(0x07);
    send_data_cmd(0x03);
    send_data_cmd(0x0A);
     send_data_cmd(0x0A);
    send_data_cmd(0x36);
    send_data_cmd(0x59);
    send_data_cmd(0x4B);
    send_data_cmd(0x0C);
    send_data_cmd(0x18);
    send_data_cmd(0x0F);
    send_data_cmd(0x22);
    send_data_cmd(0x1F);
     send_data_cmd(0x0F);

     send_ctrl_cmd(0xE1);	// Negative Gamma Correction
    send_data_cmd(0x06);
    send_data_cmd(0x23);
    send_data_cmd(0x24);
    send_data_cmd(0x01);
    send_data_cmd(0x0F);
     send_data_cmd(0x01);
    send_data_cmd(0x31);
    send_data_cmd(0x23);
    send_data_cmd(0x40);
    send_data_cmd(0x07);
     send_data_cmd(0x0F);
     send_data_cmd(0x0F);
    send_data_cmd(0x30);
    send_data_cmd(0x31);
    send_data_cmd(0x0E);

     send_ctrl_cmd(0x2A);	// Column address
     send_data_cmd(0x00);
     send_data_cmd(0x00);
     send_data_cmd(0x00);
     send_data_cmd(0xEF);

     send_ctrl_cmd(0x2B);	// Page address
     send_data_cmd(0x00);
     send_data_cmd(0x00);
     send_data_cmd(0x01);
     send_data_cmd(0x3F);

     send_ctrl_cmd(0xE8);
     send_data_cmd(0x84);
     send_data_cmd(0x1A);
     send_data_cmd(0x68);

    send_ctrl_cmd(0x11);  // Exit Sleep
     MDELAY(120);

    send_ctrl_cmd(0x2C);

    MDELAY(80);
    send_ctrl_cmd(0x29);  // LCD on
#else // HDK board
     send_ctrl_cmd(0xCF);	// EXTC Option
     send_data_cmd(0x20);
     send_data_cmd(0x21);
     send_data_cmd(0x20);

     send_ctrl_cmd(0xF2); // 3-Gamma Function Off
     send_data_cmd(0x02);

     send_ctrl_cmd(0xB4); // Inversion Control -> 2Dot inversion
     send_data_cmd(0x02);

     send_ctrl_cmd(0xC0); // Powr control 1
     send_data_cmd(0x15);
     send_data_cmd(0x15);

     send_ctrl_cmd(0xC1); // Power control 2
     send_data_cmd(0x05);

     send_ctrl_cmd(0xC2);	// Powr control 3
     send_data_cmd(0x32);

     send_ctrl_cmd(0xC5);	// Vcom control 1
     send_data_cmd(0xFC);

     send_ctrl_cmd(0xCB);	// V-core Setting
     send_data_cmd(0x31);
     send_data_cmd(0x24);
     send_data_cmd(0x00);
     send_data_cmd(0x34);

     send_ctrl_cmd(0xF6);	// Interface control
     send_data_cmd(0x41);
     send_data_cmd(0x00);
     send_data_cmd(0x00);

     send_ctrl_cmd(0xB7);	// Entry Mode Set
     send_data_cmd(0x06);

     send_ctrl_cmd(0xB1);	// Frame Rate Control
     send_data_cmd(0x00);
     send_data_cmd(0x1B);

     send_ctrl_cmd(0x36);	// Memory Access Control
     send_data_cmd(0x08); // seosc 08 -> C8

     send_ctrl_cmd(0xB5);	// Blanking Porch control
     send_data_cmd(0x02);
     send_data_cmd(0x02);
     send_data_cmd(0x0A);
     send_data_cmd(0x14);

     send_ctrl_cmd(0xB6);	// Display Function control
     send_data_cmd(0x02);
     send_data_cmd(0x82);
     send_data_cmd(0x27);
     send_data_cmd(0x00);

     send_ctrl_cmd(0x3A);	// Pixel Format->DBI(5=16bit)
     send_data_cmd(0x05);

     send_ctrl_cmd(0x51);//write display brightness
     send_data_cmd(0xff);//set brightness 0x00-0xff
     MDELAY(50);

     send_ctrl_cmd(0x53);//write ctrl display
     send_data_cmd(0x24);
     MDELAY(50);

     send_ctrl_cmd(0x55);
     send_data_cmd(0x02);//still picture
     MDELAY(50);

     send_ctrl_cmd(0x5e);//write CABC minumum brightness
     send_data_cmd(0x70);//
     MDELAY(50);

     send_ctrl_cmd(0x35);	// Tearing Effect Line On
     send_data_cmd(0x00);

     send_ctrl_cmd(0x44);	// Tearing Effect Control Parameter
     send_data_cmd(0x00);
     send_data_cmd(0xEF);

     send_ctrl_cmd(0xE0);	// Positive Gamma Correction
     send_data_cmd(0x00);
     send_data_cmd(0x06);
     send_data_cmd(0x07);
     send_data_cmd(0x03);
     send_data_cmd(0x0A);
     send_data_cmd(0x0A);
     send_data_cmd(0x41);
     send_data_cmd(0x59);
     send_data_cmd(0x4D);
     send_data_cmd(0x0C);
     send_data_cmd(0x18);
     send_data_cmd(0x0F);
     send_data_cmd(0x22);
     send_data_cmd(0x1D);
     send_data_cmd(0x0F);

     send_ctrl_cmd(0xE1);	// Negative Gamma Correction
     send_data_cmd(0x06);
     send_data_cmd(0x23);
     send_data_cmd(0x24);
     send_data_cmd(0x01);
     send_data_cmd(0x0F);
     send_data_cmd(0x01);
     send_data_cmd(0x36);
     send_data_cmd(0x23);
     send_data_cmd(0x41);
     send_data_cmd(0x07);
     send_data_cmd(0x0F);
     send_data_cmd(0x0F);
     send_data_cmd(0x30);
     send_data_cmd(0x27);
     send_data_cmd(0x0E);

     send_ctrl_cmd(0x2A);	// Column address
     send_data_cmd(0x00);
     send_data_cmd(0x00);
     send_data_cmd(0x00);
     send_data_cmd(0xEF);

     send_ctrl_cmd(0x2B);	// Page address
     send_data_cmd(0x00);
     send_data_cmd(0x00);
     send_data_cmd(0x01);
     send_data_cmd(0x3F);

     send_ctrl_cmd(0xE8);
     send_data_cmd(0x84);
     send_data_cmd(0x1A);
     send_data_cmd(0x68);

     send_ctrl_cmd(0x11);
     MDELAY(120);

     send_ctrl_cmd(0X29);
#endif

}
Esempio n. 13
0
static void init_lcm_registers(void)
{
	send_ctrl_cmd(0x00B0);//Manufacturer Command Access Protect
	send_data_cmd(0x003F);
	send_data_cmd(0x003F);
	MDELAY(100);

	send_ctrl_cmd(0x00FE);//?
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);
	send_data_cmd(0x0021);
	send_data_cmd(0x00B4);

	send_ctrl_cmd(0x00B3);//Frame Memory Access and Interface Setting
	send_data_cmd(0x0000);
	send_data_cmd(0x0010);

	send_ctrl_cmd(0x00E0);//NVM Access Control
	send_data_cmd(0x0000);//NVAE: NVM access enable register. NVM access is enabled when NVAE=1.
	send_data_cmd(0x0040);//FTT: NVM control bit.
	MDELAY(50);

	send_ctrl_cmd(0x00B3);
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);

	send_ctrl_cmd(0x00FE);
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);
	send_data_cmd(0x0021);
	send_data_cmd(0x0030);

	send_ctrl_cmd(0x00B0);
	send_data_cmd(0x003F);
	send_data_cmd(0x003F);

	send_ctrl_cmd(0x00B3);
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);

	send_ctrl_cmd(0x00B4);
	send_data_cmd(0x0000);

	send_ctrl_cmd(0x00C0);
	send_data_cmd(0x0013);//GIP REV  SM GS BGR SS
	send_data_cmd(0x004F);
	send_data_cmd(0x0000);
	send_data_cmd(0x0010);
	send_data_cmd(0x00A0);//BLV=0 LINE
	send_data_cmd(0x0000);
	send_data_cmd(0x0001);
	send_data_cmd(0x0000);
	//Frame frequency (fFRM)={fosc/(Clock per line×division ratio×(NL + FP + BP))} [Hz]
	send_ctrl_cmd(0x00C1);
	send_data_cmd(0x0001);//BC0   Frame inversion(0)/Line inversion(1)
	send_data_cmd(0x0002);//DIV0[1:0]  800kHz
	send_data_cmd(0x0020);//RTN0[5:0]   clocks    21
	send_data_cmd(0x0008);//BP0[7:0]   4 lines
	send_data_cmd(0x0008);//FP0[7:0]   4 lines
	MDELAY(50);

	send_ctrl_cmd(0x00C3);  //PRTIAL MODE
	send_data_cmd(0x0001);//BC2
	send_data_cmd(0x0000);//DIV2[1:0]
	send_data_cmd(0x0021);//RTN2[5:0]
	send_data_cmd(0x0008);//BP2[7:0]
	send_data_cmd(0x0008);//FP2[7:0]
	MDELAY(50);

	send_ctrl_cmd(0x00C4);
	send_data_cmd(0x0011);
	send_data_cmd(0x0001);
	send_data_cmd(0x0033);
	send_data_cmd(0x0003);

	send_ctrl_cmd(0x00C8);
	send_data_cmd(0x0003);
	send_data_cmd(0x000a);
	send_data_cmd(0x0006);
	send_data_cmd(0x000e);
	send_data_cmd(0x000e);
	send_data_cmd(0x0007);
	send_data_cmd(0x0005);
	send_data_cmd(0x0005);
	send_data_cmd(0x0021);
	send_data_cmd(0x0004);
	send_data_cmd(0x0000);
	send_data_cmd(0x0020);
	send_data_cmd(0x0006);
	send_data_cmd(0x0006);
	send_data_cmd(0x0009);
	send_data_cmd(0x0010);
	send_data_cmd(0x0011);
	send_data_cmd(0x0009);
	send_data_cmd(0x000e);
	send_data_cmd(0x0005);
	send_data_cmd(0x0006);
	send_data_cmd(0x0001);


	send_ctrl_cmd(0x00C9);
	//send_ctrl_cmd(0x00C8);
	send_data_cmd(0x0003);
	send_data_cmd(0x000a);
	send_data_cmd(0x0006);
	send_data_cmd(0x000e);
	send_data_cmd(0x000e);
	send_data_cmd(0x0007);
	send_data_cmd(0x0005);
	send_data_cmd(0x0005);
	send_data_cmd(0x0021);
	send_data_cmd(0x0004);
	send_data_cmd(0x0000);
	send_data_cmd(0x0020);
	send_data_cmd(0x0006);
	send_data_cmd(0x0006);
	send_data_cmd(0x0009);
	send_data_cmd(0x0010);
	send_data_cmd(0x0011);
	send_data_cmd(0x0009);
	send_data_cmd(0x000e);
	send_data_cmd(0x0005);
	send_data_cmd(0x0006);
	send_data_cmd(0x0001);

	send_ctrl_cmd(0x00CA);
	//send_ctrl_cmd(0x00C8);
	send_data_cmd(0x0003);
	send_data_cmd(0x000a);
	send_data_cmd(0x0006);
	send_data_cmd(0x000e);
	send_data_cmd(0x000e);
	send_data_cmd(0x0007);
	send_data_cmd(0x0005);
	send_data_cmd(0x0005);
	send_data_cmd(0x0021);
	send_data_cmd(0x0004);
	send_data_cmd(0x0000);
	send_data_cmd(0x0020);
	send_data_cmd(0x0006);
	send_data_cmd(0x0006);
	send_data_cmd(0x0009);
	send_data_cmd(0x0010);
	send_data_cmd(0x0011);
	send_data_cmd(0x0009);
	send_data_cmd(0x000e);
	send_data_cmd(0x0005);
	send_data_cmd(0x0006);
	send_data_cmd(0x0001);



	send_ctrl_cmd(0x00D0);
	send_data_cmd(0x0033);
	send_data_cmd(0x0053);
	send_data_cmd(0x0081);
	send_data_cmd(0x0031);

	send_ctrl_cmd(0x00D1);
	send_data_cmd(0x002f);//40
	send_data_cmd(0x0057);
	//send_data_cmd(0x0010);

	send_ctrl_cmd(0x00D2);
	send_data_cmd(0x0003);
	send_data_cmd(0x0024);

	send_ctrl_cmd(0x00D4);
	send_data_cmd(0x0003);
	send_data_cmd(0x0024);

	send_ctrl_cmd(0x00E2);
	send_data_cmd(0x003F);

	send_ctrl_cmd(0x0035);//set_tear_on
	send_data_cmd(0x0000);

	send_ctrl_cmd(0x0036);
	send_data_cmd(0x0000);

	send_ctrl_cmd(0x003A);//set_pixel_format
	send_data_cmd(0x0066);//66

	send_ctrl_cmd(0x002A);//set_column_address
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);
	send_data_cmd(0x00EF);

	send_ctrl_cmd(0x002B);//set_page_address:
	send_data_cmd(0x0000);
	send_data_cmd(0x0000);
	send_data_cmd(0x0001);
	send_data_cmd(0x003F);

	send_ctrl_cmd(0x002C);//write_memory_start:
	send_ctrl_cmd(0x0011);//exit_sleep_mode
	MDELAY(100);
	send_ctrl_cmd(0x0029);//set_display_on
	MDELAY(200);
}
static void lcd_power_en(unsigned char enabled)
{
  if(enabled)
  { 
  #if 0//def BUILD_LK
    //VGP4 1.8V
    pmic_config_interface(DIGLDO_CON10, 0x1, PMIC_RG_VGP4_EN_MASK, PMIC_RG_VGP4_EN_SHIFT);
    pmic_config_interface(DIGLDO_CON31, 0x03, PMIC_RG_VGP4_VOSEL_MASK, PMIC_RG_VGP4_VOSEL_SHIFT);    
	  MDELAY(1);
    //VGP6 3.3V
    pmic_config_interface(DIGLDO_CON12, 0x1, PMIC_RG_VGP6_EN_MASK, PMIC_RG_VGP6_EN_SHIFT);
    pmic_config_interface(DIGLDO_CON33, 0x07, PMIC_RG_VGP6_VOSEL_MASK, PMIC_RG_VGP6_VOSEL_SHIFT);
  #else
    //VGP4 1.8V
    upmu_set_rg_vgp4_en(0x1);
    upmu_set_rg_vgp4_vosel(0x3);     
    MDELAY(1);
    //VGP6 3.3V    
    upmu_set_rg_vgp6_en(0x1);
    upmu_set_rg_vgp6_vosel(0x7);    
  #endif   

/*
    mt_set_gpio_mode(GPIO_LCD_BIST, GPIO_MODE_00); //BIST PIN, always keep low	       
    mt_set_gpio_dir(GPIO_LCD_BIST, GPIO_DIR_OUT);        
    mt_set_gpio_out(GPIO_LCD_BIST, GPIO_OUT_ZERO);

    mt_set_gpio_mode(GPIO_LCD_MIPI_PANEL_EN, GPIO_MODE_00);	//MIPI_PANEL_EN PIN, always keep low	  
    mt_set_gpio_dir(GPIO_LCD_MIPI_PANEL_EN, GPIO_DIR_OUT);		 
    mt_set_gpio_out(GPIO_LCD_MIPI_PANEL_EN, GPIO_OUT_ZERO);
*/
  }
  else
  {
/*
    mt_set_gpio_mode(GPIO_LCD_BIST, GPIO_MODE_00);        //BIST PIN  
    mt_set_gpio_dir(GPIO_LCD_BIST, GPIO_DIR_OUT);        
    mt_set_gpio_out(GPIO_LCD_BIST, GPIO_OUT_ZERO); 

    mt_set_gpio_mode(GPIO_LCD_MIPI_PANEL_EN, GPIO_MODE_00);     //MIPI_PANEL_EN PIN, always keep low   
    mt_set_gpio_dir(GPIO_LCD_MIPI_PANEL_EN, GPIO_DIR_OUT);        
    mt_set_gpio_out(GPIO_LCD_MIPI_PANEL_EN, GPIO_OUT_ZERO);
*/
    #if 0 //def BUILD_LK
    //VGP4 1.8V
    pmic_config_interface(DIGLDO_CON10, 0x0, PMIC_RG_VGP4_EN_MASK, PMIC_RG_VGP4_EN_SHIFT);
    pmic_config_interface(DIGLDO_CON31, 0x0, PMIC_RG_VGP4_VOSEL_MASK, PMIC_RG_VGP4_VOSEL_SHIFT);    

    MDELAY(55);  //delay 55ms   

    //VGP6 3.3V
    pmic_config_interface(DIGLDO_CON12, 0x0, PMIC_RG_VGP6_EN_MASK, PMIC_RG_VGP6_EN_SHIFT);
    pmic_config_interface(DIGLDO_CON33, 0x0, PMIC_RG_VGP6_VOSEL_MASK, PMIC_RG_VGP6_VOSEL_SHIFT);

	#else
    //VGP6 3.3V    
    upmu_set_rg_vgp6_en(0x0);
    upmu_set_rg_vgp6_vosel(0x0);
    MDELAY(55);  //delay 55ms
    //VGP4 1.8V
    upmu_set_rg_vgp4_en(0x0);
    upmu_set_rg_vgp4_vosel(0x0);     
	#endif
  }
}
Esempio n. 15
0
static void init_lcm_registers(void)
{
#ifdef BUILD_LK
	printf("init_lcm_registers -----jmo4861 \r\n");
#else
	printk("init_lcm_registers-----jmo4861  \r\n");
#endif
    //LK@Z1
	send_ctrl_cmd(0xB9); //EXTC
	send_data_cmd(0xFF); //EXTC
	send_data_cmd(0x83); //EXTC
	send_data_cmd(0x57); //EXTC
	MDELAY(15);

	send_ctrl_cmd(0xB6); //
	send_data_cmd(0x25); //6f VCOMDC//56

	send_ctrl_cmd(0x11); // SLPOUT
	MDELAY(130);
	//send_ctrl_cmd(0x35); // TE ON //LK@
        

/*
        send_ctrl_cmd(0xe9); 
	send_data_cmd(0x20); 
*/
        /*
	send_ctrl_cmd(0xB0);
	send_data_cmd(0x68); //80Hz
	send_data_cmd(0x01); 
        */
	send_ctrl_cmd(0xCC); // Set Panel
	send_data_cmd(0x09); //09

	send_ctrl_cmd(0xB1); //
	send_data_cmd(0x00); //
	send_data_cmd(0x15); //BT
	send_data_cmd(0x1e); //1c VSPR//LK@0x3B
	send_data_cmd(0x1e); //1c VSNR//LK@0x3B
	send_data_cmd(0x83); //83 AP  83
	send_data_cmd(0xAA); //FS

	send_ctrl_cmd(0xB4); //
	send_data_cmd(0x02); //NW
	send_data_cmd(0x40); //RTN
	send_data_cmd(0x00); //DIV
	send_data_cmd(0x2A); //DUM
	send_data_cmd(0x2A); //DUM
	send_data_cmd(0x0d); //0D GDON
	send_data_cmd(0x4f); //GDOFF
/*
	send_ctrl_cmd(0xB5); 
	send_data_cmd(0x01); 
	send_data_cmd(0x01); 
	send_data_cmd(0x67); 
*/
	send_ctrl_cmd(0xB3);		//COLOR FORMAT
	send_data_cmd(0xC3);		//SDO_EN,BYPASS,EPF[1:0],0,0,RM,DM//43->C3,SDO_EN=1
	send_data_cmd(0x08);//0x00		//DPL,HSPL,VSPL,EPL
	send_data_cmd(0x06);		//RCM, HPL[5:0]
	send_data_cmd(0x06);		//VPL[5:0]
/*
	send_ctrl_cmd(0xE3); 
	send_data_cmd(0x37); 
	send_data_cmd(0x27);
*/
	send_ctrl_cmd(0xC0); //STBA
	send_data_cmd(0x24); //OPON////LK@0x50
	send_data_cmd(0x24); //OPON///LK@0x50
	send_data_cmd(0x01); //
	send_data_cmd(0x3C); //
	send_data_cmd(0x1E); //
	send_data_cmd(0x08); //GEN

	send_ctrl_cmd(0xE0); //
	send_data_cmd(0x02); //02 1//
	send_data_cmd(0x08); //06 2//
	send_data_cmd(0x11); //3
	send_data_cmd(0x23); //4
	send_data_cmd(0x2C); //5
	send_data_cmd(0x40); //6
	send_data_cmd(0x4A); //7
	send_data_cmd(0x52); //8
	send_data_cmd(0x48); //9
	send_data_cmd(0x41); //10
	send_data_cmd(0x3C); //11
	send_data_cmd(0x33); //12
	send_data_cmd(0x2E); //13
	send_data_cmd(0x28); //14
	send_data_cmd(0x27); //15
	send_data_cmd(0x1B); //16

	send_data_cmd(0x02); //02 17 v1
	send_data_cmd(0x08); //06 18
	send_data_cmd(0x11); //19
	send_data_cmd(0x23); //20
	send_data_cmd(0x2C); //21
	send_data_cmd(0x40); //22
	send_data_cmd(0x4A); //23
	send_data_cmd(0x52); //24
	send_data_cmd(0x48); //25
	send_data_cmd(0x41); //26
	send_data_cmd(0x3C); //27
	send_data_cmd(0x33); //28
	send_data_cmd(0x2E); //29
	send_data_cmd(0x28); //30
	send_data_cmd(0x27); //28 31
	send_data_cmd(0x1B); //03 32
	send_data_cmd(0x00); //33
	send_data_cmd(0x01); //34

    send_ctrl_cmd(0x3A); 
	send_data_cmd(0x66);  //LK@ 0x77:24bit;0x66:18bit;0x55:16bit

        send_ctrl_cmd(0x36); 
	send_data_cmd(0x00);  

	send_ctrl_cmd(0x29); // Display On
	MDELAY(25);
	//send_ctrl_cmd(0x2C); //memary write


}
static unsigned int lcm_compare_id(void)
{
	#if 1
	unsigned int  data_array[16];
	unsigned char buffer_c5[3];
	unsigned char buffer_04[3];
	
	SET_RESET_PIN(1);
	MDELAY(20);
	SET_RESET_PIN(0);
	MDELAY(20);
	SET_RESET_PIN(1);
	MDELAY(50);

	data_array[0] = 0x00033700;
	dsi_set_cmdq(data_array, 1, 1);
	read_reg_v2(0x04, buffer_04, 3);

	data_array[0] = 0x00033700;
	dsi_set_cmdq(data_array, 1, 1);
	read_reg_v2(0x04, buffer_04, 3);
	
	data_array[0]=0x00063902;
	data_array[1]=0x52AA55F0;
	data_array[2]=0x00000108;
	dsi_set_cmdq(&data_array,3,1);
	
	data_array[0] = 0x00033700;
	dsi_set_cmdq(data_array, 1, 1);
	read_reg_v2(0xC5, buffer_c5, 3);

	if ((buffer_c5[0]==0x55)&&(buffer_c5[1]==0x17)){
		return 1;
	}else{
		return 1;
	}
#endif
#if 0
	unsigned int lcd_id1_pin = 0;
	unsigned int lcd_id2_pin = 0;
	if (!first_inited)
	{
		SET_RESET_PIN(1);
		SET_RESET_PIN(0);
		MDELAY(50);//Must > 10ms
		SET_RESET_PIN(1);
		MDELAY(300);//Must > 120ms

		mt_set_gpio_mode(GPIO_LCD_ID1_PIN, GPIO_MODE_GPIO);
		mt_set_gpio_dir(GPIO_LCD_ID1_PIN, GPIO_DIR_IN);
		mt_set_gpio_pull_enable(GPIO_LCD_ID1_PIN, GPIO_PULL_ENABLE);
		mt_set_gpio_pull_select(GPIO_LCD_ID1_PIN, GPIO_PULL_DOWN);
		mt_set_gpio_mode(GPIO_LCD_ID2_PIN, GPIO_MODE_GPIO);
		mt_set_gpio_dir(GPIO_LCD_ID2_PIN, GPIO_DIR_IN);
		mt_set_gpio_pull_enable(GPIO_LCD_ID2_PIN, GPIO_PULL_ENABLE);
		mt_set_gpio_pull_select(GPIO_LCD_ID2_PIN, GPIO_PULL_DOWN);
		MDELAY(50);
		
		lcd_id1_pin = mt_get_gpio_in(GPIO_LCD_ID1_PIN);
		lcd_id2_pin = mt_get_gpio_in(GPIO_LCD_ID2_PIN);

		lcd_id_pin = (lcd_id2_pin << 1) | lcd_id1_pin;
		first_inited = 1;
	}
	#ifndef BUILD_LK
	printk("<0>nt35517: lcd_id2_pin=%d,lcd_id1_pin=%d\n",lcd_id2_pin,lcd_id1_pin);
	printk("<0> 2222222222222222222222222222222222\n");
	#endif
	  if (lcd_id2_pin == 1) 
	    return 1;
    else 
	    return 1;
	    #endif
}
static void init_lcm_registers(void)
{
    unsigned int data_array[16];

    data_array[0]= 0x00043902;
    data_array[1]= 0x0698ffff;
    dsi_set_cmdq(data_array, 2, 1);

    data_array[0]= 0x00023902;
    data_array[1]= 0x000060ba;
    dsi_set_cmdq(data_array, 2, 1);

    data_array[0]= 0x00023902;
    data_array[1]= 0x000001b0;
    dsi_set_cmdq(data_array, 2, 1);
     
    data_array[0]= 0x00163902;
    data_array[1]= 0x030e03bc;
    data_array[2]= 0x1b010163;
    data_array[3]= 0x00006f12;
    data_array[4]= 0x03010100;
    data_array[5]= 0x01f2ff00;
	data_array[6]= 0x0000c000;
    dsi_set_cmdq(data_array, 7, 1);
    
    data_array[0]= 0x00093902;
    data_array[1]= 0x451302bd;
    data_array[2]= 0x01674567;
    data_array[3]= 0x00000023;
    dsi_set_cmdq(data_array, 4, 1);
	
	data_array[0]= 0x000a3902;
    data_array[1]= 0x222201be;
    data_array[2]= 0x2267badc;
    data_array[3]= 0x00002222;    
    dsi_set_cmdq(data_array, 4, 1);

    data_array[0]= 0x00023902;
    data_array[1]= 0x000057C7;
    dsi_set_cmdq(data_array, 2, 1); 
     
    data_array[0]= 0x00043902;
    data_array[1]= 0x000f7fed;
    dsi_set_cmdq(data_array, 2, 1);   
	
   data_array[0]= 0x00043902;
    data_array[1]= 0x0a0b03c0;
    dsi_set_cmdq(data_array, 2, 1); 

	data_array[0]= 0x00023902;
    data_array[1]= 0x000008FC;
    dsi_set_cmdq(data_array, 2, 1); 


    data_array[0]= 0x00073902;
    data_array[1]= 0x000000DF;
    data_array[2]= 0x00200000;
    dsi_set_cmdq(data_array, 3, 1); 
	
    data_array[0]= 0x00023902;
    data_array[1]= 0x000074f3;
    dsi_set_cmdq(data_array, 2, 1);
    
   data_array[0]= 0x00043902;
   data_array[1]= 0x020202b4;
   dsi_set_cmdq(data_array, 2, 1);    
 
   


	data_array[0]= 0x00023902;
    data_array[1]= 0x000081F7;
    dsi_set_cmdq(data_array, 2, 1); 

	data_array[0]= 0x00043902;
    data_array[1]= 0x131300B1;
    dsi_set_cmdq(data_array, 2, 1); 

	data_array[0]= 0x00053902;
       data_array[1]= 0x400280F2;
	data_array[2]= 0x00000028;
    dsi_set_cmdq(data_array, 3, 1); 
    
    data_array[0]= 0x00053902;
    data_array[1]= 0x7B7817c1;
    data_array[2]= 0x00000020;
    dsi_set_cmdq(data_array, 3, 1);    
    
                 
    
    data_array[0]= 0x00113902;
    data_array[1]= 0x130600e0;
    data_array[2]= 0xCB181211;
    data_array[3]= 0x0506020A;
    data_array[4]= 0x292E0E0D;
    data_array[5]= 0x00000000;
    dsi_set_cmdq(data_array, 6, 1);    
	
data_array[0]= 0x00113902;
    data_array[1]= 0x0E0600e1;
    data_array[2]= 0x78161110;
    data_array[3]= 0x07070308;
    data_array[4]= 0x262B090C;
    data_array[5]= 0x00000000;
    dsi_set_cmdq(data_array, 6, 1);       

	data_array[0]= 0x00023902;
    data_array[1]= 0x00000035;
    dsi_set_cmdq(data_array, 2, 1); 
     
  // 	data_array[0]= 0x00023902;
 //   data_array[1]= 0x0000C036;
 //   dsi_set_cmdq(data_array, 2, 1);               
    
     data_array[0] = 0x00110500;
    dsi_set_cmdq(data_array, 1, 1);
    MDELAY(120);
    data_array[0]= 0x000A3902;//added for esd read reg maliejun 20130823
    data_array[1]= 0x5F1B0Aee;
    data_array[2]= 0x10000040;
    data_array[3]= 0x00005800;
    dsi_set_cmdq(data_array, 4, 1);
    
    
    data_array[0]= 0x00290500;
    dsi_set_cmdq(data_array, 1, 1);

    data_array[0]= 0x002c3909;
    dsi_set_cmdq(data_array, 1, 0);  
}
Esempio n. 18
0
static void init_lcm_registers(void)
{
//ENABLE PAGE 1
set_lcm_register(0xF000,0x55);
set_lcm_register(0xF001,0xAA);
set_lcm_register(0xF002,0x52);
set_lcm_register(0xF003,0x08);
set_lcm_register(0xF004,0x00);
set_lcm_register(0xB100,0x0C);
set_lcm_register(0xB101,0x00);

//VGMP/VGMN/VCOM SETING
set_lcm_register(0xBC00,0x05);
set_lcm_register(0xBC01,0x05);
set_lcm_register(0xBC02,0x05);
    set_lcm_register(0xBD02,0x07);
    set_lcm_register(0xBD03,0x1c);  //31
set_lcm_register(0xF000,0x55);
set_lcm_register(0xF001,0xAA);
set_lcm_register(0xF002,0x52);
set_lcm_register(0xF003,0x08);
set_lcm_register(0xF004,0x01);

//BGH VOLTAGE SETTING
set_lcm_register(0xB900,0x24);
set_lcm_register(0xB901,0x24);
set_lcm_register(0xB902,0x24);

//VGLX VOLTAGE SETTING
set_lcm_register(0xBA00,0x24);
set_lcm_register(0xBA01,0x24);
set_lcm_register(0xBA02,0x24);
set_lcm_register(0xBE00,0x00);//40
set_lcm_register(0xBE01,0x78);//78

//Z-INVERSION
set_lcm_register(0xBC00,0x00);
set_lcm_register(0xBC01,0x88);
set_lcm_register(0xBC02,0x01);
set_lcm_register(0xBD00,0x00);
set_lcm_register(0xBD01,0x88);
set_lcm_register(0xBD02,0x01);

//GAMMA SETING  RED
set_lcm_register(0xD100,0x00);
set_lcm_register(0xD101,0x00);
set_lcm_register(0xD102,0x00);
set_lcm_register(0xD103,0x16);
set_lcm_register(0xD104,0x00);
set_lcm_register(0xD105,0x42);
set_lcm_register(0xD106,0x00);
set_lcm_register(0xD107,0x61);
set_lcm_register(0xD108,0x00);
set_lcm_register(0xD109,0x74);
set_lcm_register(0xD10A,0x00);
set_lcm_register(0xD10B,0x97);
set_lcm_register(0xD10C,0x00);
set_lcm_register(0xD10D,0xAD);
set_lcm_register(0xD10E,0x00);
set_lcm_register(0xD10F,0xDE);
set_lcm_register(0xD110,0x01);
set_lcm_register(0xD111,0x00);
set_lcm_register(0xD112,0x01);
set_lcm_register(0xD113,0x26);
set_lcm_register(0xD114,0x01);
set_lcm_register(0xD115,0x50);
set_lcm_register(0xD116,0x01);
set_lcm_register(0xD117,0x87);
set_lcm_register(0xD118,0x01);
set_lcm_register(0xD119,0xB3);
set_lcm_register(0xD11A,0x01);
set_lcm_register(0xD11B,0xB6);
set_lcm_register(0xD11C,0x01);
set_lcm_register(0xD11D,0xDC);
set_lcm_register(0xD11E,0x02);
set_lcm_register(0xD11F,0x04);
set_lcm_register(0xD120,0x02);
set_lcm_register(0xD121,0x1C);
set_lcm_register(0xD122,0x02);
set_lcm_register(0xD123,0x34);
set_lcm_register(0xD124,0x02);
set_lcm_register(0xD125,0x4E);
set_lcm_register(0xD126,0x02);
set_lcm_register(0xD127,0x8A);
set_lcm_register(0xD128,0x02);
set_lcm_register(0xD129,0xC2);
set_lcm_register(0xD12A,0x03);
set_lcm_register(0xD12B,0x04);
set_lcm_register(0xD12C,0x03);
set_lcm_register(0xD12D,0x2E);
set_lcm_register(0xD12E,0x03);
set_lcm_register(0xD12F,0x74);
set_lcm_register(0xD130,0x03);
set_lcm_register(0xD131,0xEB);
set_lcm_register(0xD132,0x03);
set_lcm_register(0xD133,0xFF);

//GAMMA SETING  RED
set_lcm_register(0xD200,0x00);
set_lcm_register(0xD201,0x00);
set_lcm_register(0xD202,0x00);
set_lcm_register(0xD203,0x16);
set_lcm_register(0xD204,0x00);
set_lcm_register(0xD205,0x42);
set_lcm_register(0xD206,0x00);
set_lcm_register(0xD207,0x61);
set_lcm_register(0xD208,0x00);
set_lcm_register(0xD209,0x74);
set_lcm_register(0xD20A,0x00);
set_lcm_register(0xD20B,0x97);
set_lcm_register(0xD20C,0x00);
set_lcm_register(0xD20D,0xAD);
set_lcm_register(0xD20E,0x00);
set_lcm_register(0xD20F,0xDE);
set_lcm_register(0xD210,0x01);
set_lcm_register(0xD211,0x00);
set_lcm_register(0xD212,0x01);
set_lcm_register(0xD213,0x26);
set_lcm_register(0xD214,0x01);
set_lcm_register(0xD215,0x50);
set_lcm_register(0xD216,0x01);
set_lcm_register(0xD217,0x87);
set_lcm_register(0xD218,0x01);
set_lcm_register(0xD219,0xB3);
set_lcm_register(0xD21A,0x01);
set_lcm_register(0xD21B,0xB6);
set_lcm_register(0xD21C,0x01);
set_lcm_register(0xD21D,0xDC);
set_lcm_register(0xD21E,0x02);
set_lcm_register(0xD21F,0x04);
set_lcm_register(0xD220,0x02);
set_lcm_register(0xD221,0x1C);
set_lcm_register(0xD222,0x02);
set_lcm_register(0xD223,0x34);
set_lcm_register(0xD224,0x02);
set_lcm_register(0xD225,0x4E);
set_lcm_register(0xD226,0x02);
set_lcm_register(0xD227,0x8A);
set_lcm_register(0xD228,0x02);
set_lcm_register(0xD229,0xC2);
set_lcm_register(0xD22A,0x03);
set_lcm_register(0xD22B,0x04);
set_lcm_register(0xD22C,0x03);
set_lcm_register(0xD22D,0x2E);
set_lcm_register(0xD22E,0x03);
set_lcm_register(0xD22F,0x74);
set_lcm_register(0xD230,0x03);
set_lcm_register(0xD231,0xEB);
set_lcm_register(0xD232,0x03);
set_lcm_register(0xD233,0xFF);


//GAMMA SETING  RED
set_lcm_register(0xD300,0x00);
set_lcm_register(0xD301,0x00);
set_lcm_register(0xD302,0x00);
set_lcm_register(0xD303,0x16);
set_lcm_register(0xD304,0x00);
set_lcm_register(0xD305,0x42);
set_lcm_register(0xD306,0x00);
set_lcm_register(0xD307,0x61);
set_lcm_register(0xD308,0x00);
set_lcm_register(0xD309,0x74);
set_lcm_register(0xD30A,0x00);
set_lcm_register(0xD30B,0x97);
set_lcm_register(0xD30C,0x00);
set_lcm_register(0xD30D,0xAD);
set_lcm_register(0xD30E,0x00);
set_lcm_register(0xD30F,0xDE);
set_lcm_register(0xD310,0x01);
set_lcm_register(0xD311,0x00);
set_lcm_register(0xD312,0x01);
set_lcm_register(0xD313,0x26);
set_lcm_register(0xD314,0x01);
set_lcm_register(0xD315,0x50);
set_lcm_register(0xD316,0x01);
set_lcm_register(0xD317,0x87);
set_lcm_register(0xD318,0x01);
set_lcm_register(0xD319,0xB3);
set_lcm_register(0xD31A,0x01);
set_lcm_register(0xD31B,0xB6);
set_lcm_register(0xD31C,0x01);
set_lcm_register(0xD31D,0xDC);
set_lcm_register(0xD31E,0x02);
set_lcm_register(0xD31F,0x04);
set_lcm_register(0xD320,0x02);
set_lcm_register(0xD321,0x1C);
set_lcm_register(0xD322,0x02);
set_lcm_register(0xD323,0x34);
set_lcm_register(0xD324,0x02);
set_lcm_register(0xD325,0x4E);
set_lcm_register(0xD326,0x02);
set_lcm_register(0xD327,0x8A);
set_lcm_register(0xD328,0x02);
set_lcm_register(0xD329,0xC2);
set_lcm_register(0xD32A,0x03);
set_lcm_register(0xD32B,0x04);
set_lcm_register(0xD32C,0x03);
set_lcm_register(0xD32D,0x2E);
set_lcm_register(0xD32E,0x03);
set_lcm_register(0xD32F,0x74);
set_lcm_register(0xD330,0x03);
set_lcm_register(0xD331,0xEB);
set_lcm_register(0xD332,0x03);
set_lcm_register(0xD333,0xFF);


//GAMMA SETING  RED
set_lcm_register(0xD400,0x00);
set_lcm_register(0xD401,0x00);
set_lcm_register(0xD402,0x00);
set_lcm_register(0xD403,0x16);
set_lcm_register(0xD404,0x00);
set_lcm_register(0xD405,0x42);
set_lcm_register(0xD406,0x00);
set_lcm_register(0xD407,0x61);
set_lcm_register(0xD408,0x00);
set_lcm_register(0xD409,0x74);
set_lcm_register(0xD40A,0x00);
set_lcm_register(0xD40B,0x97);
set_lcm_register(0xD40C,0x00);
set_lcm_register(0xD40D,0xAD);
set_lcm_register(0xD40E,0x00);
set_lcm_register(0xD40F,0xDE);
set_lcm_register(0xD410,0x01);
set_lcm_register(0xD411,0x00);
set_lcm_register(0xD412,0x01);
set_lcm_register(0xD413,0x26);
set_lcm_register(0xD414,0x01);
set_lcm_register(0xD415,0x50);
set_lcm_register(0xD416,0x01);
set_lcm_register(0xD417,0x87);
set_lcm_register(0xD418,0x01);
set_lcm_register(0xD419,0xB3);
set_lcm_register(0xD41A,0x01);
set_lcm_register(0xD41B,0xB6);
set_lcm_register(0xD41C,0x01);
set_lcm_register(0xD41D,0xDC);
set_lcm_register(0xD41E,0x02);
set_lcm_register(0xD41F,0x04);
set_lcm_register(0xD420,0x02);
set_lcm_register(0xD421,0x1C);
set_lcm_register(0xD422,0x02);
set_lcm_register(0xD423,0x34);
set_lcm_register(0xD424,0x02);
set_lcm_register(0xD425,0x4E);
set_lcm_register(0xD426,0x02);
set_lcm_register(0xD427,0x8A);
set_lcm_register(0xD428,0x02);
set_lcm_register(0xD429,0xC2);
set_lcm_register(0xD42A,0x03);
set_lcm_register(0xD42B,0x04);
set_lcm_register(0xD42C,0x03);
set_lcm_register(0xD42D,0x2E);
set_lcm_register(0xD42E,0x03);
set_lcm_register(0xD42F,0x74);
set_lcm_register(0xD430,0x03);
set_lcm_register(0xD431,0xEB);
set_lcm_register(0xD432,0x03);
set_lcm_register(0xD433,0xFF);


//GAMMA SETING  RED
set_lcm_register(0xD500,0x00);
set_lcm_register(0xD501,0x00);
set_lcm_register(0xD502,0x00);
set_lcm_register(0xD503,0x16);
set_lcm_register(0xD504,0x00);
set_lcm_register(0xD505,0x42);
set_lcm_register(0xD506,0x00);
set_lcm_register(0xD507,0x61);
set_lcm_register(0xD508,0x00);
set_lcm_register(0xD509,0x74);
set_lcm_register(0xD50A,0x00);
set_lcm_register(0xD50B,0x97);
set_lcm_register(0xD50C,0x00);
set_lcm_register(0xD50D,0xAD);
set_lcm_register(0xD50E,0x00);
set_lcm_register(0xD50F,0xDE);
set_lcm_register(0xD510,0x01);
set_lcm_register(0xD511,0x00);
set_lcm_register(0xD512,0x01);
set_lcm_register(0xD513,0x26);
set_lcm_register(0xD514,0x01);
set_lcm_register(0xD515,0x50);
set_lcm_register(0xD516,0x01);
set_lcm_register(0xD517,0x87);
set_lcm_register(0xD518,0x01);
set_lcm_register(0xD519,0xB3);
set_lcm_register(0xD51A,0x01);
set_lcm_register(0xD51B,0xB6);
set_lcm_register(0xD51C,0x01);
set_lcm_register(0xD51D,0xDC);
set_lcm_register(0xD51E,0x02);
set_lcm_register(0xD51F,0x04);
set_lcm_register(0xD520,0x02);
set_lcm_register(0xD521,0x1C);
set_lcm_register(0xD522,0x02);
set_lcm_register(0xD523,0x34);
set_lcm_register(0xD524,0x02);
set_lcm_register(0xD525,0x4E);
set_lcm_register(0xD526,0x02);
set_lcm_register(0xD527,0x8A);
set_lcm_register(0xD528,0x02);
set_lcm_register(0xD529,0xC2);
set_lcm_register(0xD52A,0x03);
set_lcm_register(0xD52B,0x04);
set_lcm_register(0xD52C,0x03);
set_lcm_register(0xD52D,0x2E);
set_lcm_register(0xD52E,0x03);
set_lcm_register(0xD52F,0x74);
set_lcm_register(0xD530,0x03);
set_lcm_register(0xD531,0xEB);
set_lcm_register(0xD532,0x03);
set_lcm_register(0xD533,0xFF);



//GAMMA SETING  RED
set_lcm_register(0xD600,0x00);
set_lcm_register(0xD601,0x00);
set_lcm_register(0xD602,0x00);
set_lcm_register(0xD603,0x16);
set_lcm_register(0xD604,0x00);
set_lcm_register(0xD605,0x42);
set_lcm_register(0xD606,0x00);
set_lcm_register(0xD607,0x61);
set_lcm_register(0xD608,0x00);
set_lcm_register(0xD609,0x74);
set_lcm_register(0xD60A,0x00);
set_lcm_register(0xD60B,0x97);
set_lcm_register(0xD60C,0x00);
set_lcm_register(0xD60D,0xAD);
set_lcm_register(0xD60E,0x00);
set_lcm_register(0xD60F,0xDE);
set_lcm_register(0xD610,0x01);
set_lcm_register(0xD611,0x00);
set_lcm_register(0xD612,0x01);
set_lcm_register(0xD613,0x26);
set_lcm_register(0xD614,0x01);
set_lcm_register(0xD615,0x50);
set_lcm_register(0xD616,0x01);
set_lcm_register(0xD617,0x87);
set_lcm_register(0xD618,0x01);
set_lcm_register(0xD619,0xB3);
set_lcm_register(0xD61A,0x01);
set_lcm_register(0xD61B,0xB6);
set_lcm_register(0xD61C,0x01);
set_lcm_register(0xD61D,0xDC);
set_lcm_register(0xD61E,0x02);
set_lcm_register(0xD61F,0x04);
set_lcm_register(0xD620,0x02);
set_lcm_register(0xD621,0x1C);
set_lcm_register(0xD622,0x02);
set_lcm_register(0xD623,0x34);
set_lcm_register(0xD624,0x02);
set_lcm_register(0xD625,0x4E);
set_lcm_register(0xD626,0x02);
set_lcm_register(0xD627,0x8A);
set_lcm_register(0xD628,0x02);
set_lcm_register(0xD629,0xC2);
set_lcm_register(0xD62A,0x03);
set_lcm_register(0xD62B,0x04);
set_lcm_register(0xD62C,0x03);
set_lcm_register(0xD62D,0x2E);
set_lcm_register(0xD62E,0x03);
set_lcm_register(0xD62F,0x74);
set_lcm_register(0xD630,0x03);
set_lcm_register(0xD631,0xEB);
set_lcm_register(0xD632,0x03);
set_lcm_register(0xD633,0xFF);
    send_ctrl_cmd(0x1100);//Sleep out
    MDELAY(300);
    
    send_ctrl_cmd(0x2900);//Display on
    MDELAY(200);

}
Esempio n. 19
0
static void init_lcm_registers(void)
{
	unsigned int data_array[16];

	data_array[0] = 0x00062902;
    data_array[1] = 0x800043E0;
	data_array[2] = 0x00000000;
    dsi_set_cmdq(&data_array, 3, 1);
	//MDELAY(1);

	data_array[0] = 0x00022902;
    data_array[1] = 0x00000836;
    dsi_set_cmdq(&data_array, 2, 1);
	//MDELAY(1);

	data_array[0] = 0x00022902;
    data_array[1] = 0x000000B3;
    dsi_set_cmdq(&data_array, 2, 1);
	//MDELAY(1);

	data_array[0] = 0x00062902;
    data_array[1] = 0x402010b5;
	data_array[2] = 0x00002000;
    dsi_set_cmdq(&data_array, 3, 1);
	//MDELAY(1);

	data_array[0] = 0x00062902;
    data_array[1] = 0x0F7404B6;//0x0F1401B6;//0x0F7404B6;
	data_array[2] = 0x00001316;
    dsi_set_cmdq(&data_array, 3, 1);
    //MDELAY(1);
#if 1
	data_array[0] = 0x000A2902;
    data_array[1] = 0x671321D0;
	data_array[2] = 0x62061837;
	data_array[3] = 0x00000623;
    dsi_set_cmdq(&data_array, 4, 1);
	//MDELAY(1);

	data_array[0] = 0x000A2902;
    data_array[1] = 0x671321D1;
	data_array[2] = 0x62061837;
	data_array[3] = 0x00000623;
    dsi_set_cmdq(&data_array, 4, 1);
	//MDELAY(1);

	data_array[0] = 0x000A2902;
    data_array[1] = 0x671321D2;
	data_array[2] = 0x62061837;
	data_array[3] = 0x00000623;
    dsi_set_cmdq(&data_array, 4, 1);
	//MDELAY(1);


	data_array[0] = 0x000A2902;
    data_array[1] = 0x671321D3;
	data_array[2] = 0x62061837;
	data_array[3] = 0x00000623;
    dsi_set_cmdq(&data_array, 4, 1);
	//MDELAY(1);

	data_array[0] = 0x000A2902;
    data_array[1] = 0x671321D4;
	data_array[2] = 0x62061837;
	data_array[3] = 0x00000623;
    dsi_set_cmdq(&data_array, 4, 1);
	//MDELAY(1);

	data_array[0] = 0x000A2902;
    data_array[1] = 0x671321D5;
	data_array[2] = 0x62061837;
	data_array[3] = 0x00000623;
    dsi_set_cmdq(&data_array, 4, 1);
	//MDELAY(1);

#endif
    data_array[0] = 0x00032902;
    data_array[1] = 0x000B01C0;
    dsi_set_cmdq(&data_array, 2, 1);
    //MDELAY(1);

	data_array[0] = 0x000A2902;
    data_array[1] = 0x100901C3;
	data_array[2] = 0x20660002;
	data_array[3] = 0x00000022;
    dsi_set_cmdq(&data_array, 4, 1);
	//MDELAY(1);

	data_array[0] = 0x00062902;
    data_array[1] = 0x172423C4;
	data_array[2] = 0x00006317;
    dsi_set_cmdq(&data_array, 3, 1);
	//MDELAY(1);

	data_array[0] = 0x00032902;
    data_array[1] = 0x004023C6;
    dsi_set_cmdq(&data_array, 2, 1);
    //MDELAY(1);


	data_array[0] = 0x00F92300;
    //data_array[1] = 0x000000F9;
    dsi_set_cmdq(&data_array, 1, 1);
	//MDELAY(1);

	data_array[0] = 0x00110500; // Sleep Out
	dsi_set_cmdq(&data_array, 1, 1);

	MDELAY(150);

	data_array[0] = 0x00290500; // Display On
	dsi_set_cmdq(&data_array, 1, 1);
	//MDELAY(10);
}
Esempio n. 20
0
static void init_lcm_registers(void)
{
	unsigned int data_array[16];

//*************Enable CMD2 Page1  *******************//
	data_array[0] = 0x00053902;
	data_array[1] = 0x2555AAFF;
	data_array[2] = 0x00000001;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00093902;
	data_array[1] = 0x000201F8;
	data_array[2] = 0x00133320;
	data_array[3] = 0x00000048;
	dsi_set_cmdq(data_array, 4, 1);

	data_array[0] = 0x00063902;
	data_array[1] = 0x52AA55F0;
	data_array[2] = 0x00000108;
	dsi_set_cmdq(data_array, 3, 1);


//AVDD: 5.0V
	data_array[0] = 0x00043902;
	data_array[1] = 0x0D0D0DB0;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x343434B6;
	dsi_set_cmdq(data_array, 2, 1);//44

//AVEE: -5.0V
	data_array[0] = 0x00043902;
	data_array[1] = 0x0D0D0DB1;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x343434B7;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x000000B2;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x242424B8;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00023902;
	data_array[1] = 0x000001BF;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x0F0F0FB3;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x343434B9;
	dsi_set_cmdq(data_array, 2, 1);

//#VGLX:-13V
	data_array[0] = 0x00043902;
	data_array[1] = 0x080808B5;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x242424BA;
	dsi_set_cmdq(data_array, 2, 1);//34

	data_array[0] = 0x00043902;
	data_array[1] = 0x000003C2;
	dsi_set_cmdq(data_array, 2, 1);

//#VGMP:4.7V  /VGSP:0V
	data_array[0] = 0x00043902;
	data_array[1] = 0x007800BC;
	dsi_set_cmdq(data_array, 2, 1);

//#VGMN:-4.7V /VGSN:0V
	data_array[0] = 0x00043902;
	data_array[1] = 0x007800BD;
	dsi_set_cmdq(data_array, 2, 1);

//##VCOM  Setting
	data_array[0] = 0x00033902;
	data_array[1] = 0x005500BE;//55 59 64
	dsi_set_cmdq(data_array, 2, 1);//5B

//# R+
	data_array[0] = 0x00353902;
	data_array[1] = 0x001F00D1;
	data_array[2] = 0x00340020;
	data_array[3] = 0x00750055;
	data_array[4] = 0x01CF00A9;
	data_array[5] = 0x0133010B;
	data_array[6] = 0x019E0171;
	data_array[7] = 0x020E02DE;
	data_array[8] = 0x023C0210;
	data_array[9] = 0x027F0267;
	data_array[10] = 0x02AE029C;
	data_array[11] = 0x02D302C5;
	data_array[12] = 0x03F402E6;
	data_array[13] = 0x03390308;
	data_array[14] = 0x000000FA;
	dsi_set_cmdq(data_array, 15, 1);

//#G +
	data_array[0] = 0x00353902;
	data_array[1] = 0x001F00D2;
	data_array[2] = 0x00340020;
	data_array[3] = 0x00750055;
	data_array[4] = 0x01CF00A9;
	data_array[5] = 0x0133010B;
	data_array[6] = 0x019E0171;
	data_array[7] = 0x020E02DE;
	data_array[8] = 0x023C0210;
	data_array[9] = 0x027F0267;
	data_array[10] = 0x02AE029C;
	data_array[11] = 0x02D302C5;
	data_array[12] = 0x03F402E6;
	data_array[13] = 0x03390308;
	data_array[14] = 0x000000FA;
	dsi_set_cmdq(data_array, 15, 1);

//#B +
	data_array[0] = 0x00353902;
	data_array[1] = 0x001F00D3;
	data_array[2] = 0x00340020;
	data_array[3] = 0x00750055;
	data_array[4] = 0x01CF00A9;
	data_array[5] = 0x0133010B;
	data_array[6] = 0x019E0171;
	data_array[7] = 0x020E02DE;
	data_array[8] = 0x023C0210;
	data_array[9] = 0x027F0267;
	data_array[10] = 0x02AE029C;
	data_array[11] = 0x02D302C5;
	data_array[12] = 0x03F402E6;
	data_array[13] = 0x03390308;
	data_array[14] = 0x000000FA;
	dsi_set_cmdq(data_array, 15, 1);

//#R -
	data_array[0] = 0x00353902;
	data_array[1] = 0x001F00D4;
	data_array[2] = 0x00340020;
	data_array[3] = 0x00750055;
	data_array[4] = 0x01CF00A9;
	data_array[5] = 0x0133010B;
	data_array[6] = 0x019E0171;
	data_array[7] = 0x020E02DE;
	data_array[8] = 0x023C0210;
	data_array[9] = 0x027F0267;
	data_array[10] = 0x02AE029C;
	data_array[11] = 0x02D302C5;
	data_array[12] = 0x03F402E6;
	data_array[13] = 0x03390308;
	data_array[14] = 0x000000FA;
	dsi_set_cmdq(data_array, 15, 1);

//#G -
	data_array[0] = 0x00353902;
	data_array[1] = 0x001F00D5;
	data_array[2] = 0x00340020;
	data_array[3] = 0x00750055;
	data_array[4] = 0x01CF00A9;
	data_array[5] = 0x0133010B;
	data_array[6] = 0x019E0171;
	data_array[7] = 0x020E02DE;
	data_array[8] = 0x023C0210;
	data_array[9] = 0x027F0267;
	data_array[10] = 0x02AE029C;
	data_array[11] = 0x02D302C5;
	data_array[12] = 0x03F402E6;
	data_array[13] = 0x03390308;
	data_array[14] = 0x000000FA;
	dsi_set_cmdq(data_array, 15, 1);

//#B -
	data_array[0] = 0x00353902;
	data_array[1] = 0x001F00D6;
	data_array[2] = 0x00340020;
	data_array[3] = 0x00750055;
	data_array[4] = 0x01CF00A9;
	data_array[5] = 0x0133010B;
	data_array[6] = 0x019E0171;
	data_array[7] = 0x020E02DE;
	data_array[8] = 0x023C0210;
	data_array[9] = 0x027F0267;
	data_array[10] = 0x02AE029C;
	data_array[11] = 0x02D302C5;
	data_array[12] = 0x03F402E6;
	data_array[13] = 0x03390308;
	data_array[14] = 0x000000FA;
	dsi_set_cmdq(data_array, 15, 1);

//#######  ENABLE PAGE 0  ############
	data_array[0] = 0x00063902;
	data_array[1] = 0x52AA55F0;
	data_array[2] = 0x00000008;
	dsi_set_cmdq(data_array, 3, 1);
//###################################

	data_array[0] = 0x6BB51500;
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x00023902;
	data_array[1] = 0x00006BB5;
	dsi_set_cmdq(data_array, 2, 1);

//#Display option control-> video mode
	data_array[0] = 0x00033902;
	data_array[1] = 0x0000CCB1;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00023902;
	data_array[1] = 0x000005B6;//05->07
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00033902;
	data_array[1] = 0x007070B7;//70->75
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00053902;
	data_array[1] = 0x050501B8;//03
	data_array[2] = 0x00000005;
	dsi_set_cmdq(data_array, 3, 1);

//#Gate EQ for rising edge
	data_array[0] = 0x00043902;
	data_array[1] = 0x000000BC;
	dsi_set_cmdq(data_array, 2, 1);

//#Source EQ
	data_array[0] = 0x00063902;
	data_array[1] = 0x1C8401BD;
	data_array[2] = 0x0000001C;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00063902;
	data_array[1] = 0x5002D0C9;
	data_array[2] = 0x00005050;
	dsi_set_cmdq(data_array, 3, 1);

	//data_array[0] = 0x00033902;
	//data_array[1] = 0x00FA0044;
	//dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00351500;
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x00023902;
	data_array[1] = 0x0000773A;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00110500;
	dsi_set_cmdq(data_array, 1, 1);
	MDELAY(120);

	data_array[0] = 0x00290500;
	dsi_set_cmdq(data_array, 1, 1);

}
Esempio n. 21
0
static void lcm_suspend(void)
{
    send_ctrl_cmd(0x1000);
    MDELAY(20);
}
Esempio n. 22
0
static void lcm_init(void)
{
	unsigned int data_array[64];

    SET_RESET_PIN(1);
    SET_RESET_PIN(0);
    MDELAY(10);//Must > 10ms
    SET_RESET_PIN(1);
    MDELAY(120);//Must > 120ms
    
	//IsFirstBoot = KAL_TRUE;

#if 0
	// 1
	data_array[0] = 0x00053902;
	data_array[1] = 0xA555AAFF;
	data_array[2] = 0x00000080;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00103902;
	data_array[1] = 0x004063F7;
	data_array[2] = 0xC4010000;
	data_array[3] = 0x640200A2;
	data_array[4] = 0xD0004854;//0x54,0x48,0x00,0xD0
	dsi_set_cmdq(data_array, 5, 1);

	data_array[0] = 0x00053902;
	data_array[1] = 0xA555AAFF;//0xFF,0xAA, 0x55, 0xA5
	data_array[2] = 0x00000000;
	dsi_set_cmdq(data_array, 3, 1);

	// 2
	data_array[0] = 0x00063902;
	data_array[1] = 0x52AA55F0;//0Xf0 0x55, 0xAA, 0x52
	data_array[2] = 0x00000108;//0x08, 0x01
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x12B01500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x12B11500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x00B21500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x07B31500;dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0x14B61500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x14B71500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x24B81500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x34B91500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x14BA1500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x01BF1500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x04C31500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x00C21500;dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0x00033902;
	data_array[1] = 0x000804C0;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x007000BC;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x007000BD;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00033902;
	data_array[1] = 0x004B00BE;
	dsi_set_cmdq(data_array, 2, 1);

	//Gamma
	data_array[0] = 0x00353902;
	data_array[1] = 0x000000D1;//D1,0x00,0x00,0x00,
	data_array[2] = 0x0022000C;//0x0C,0x00,0x22,0x00
	data_array[3] = 0x00470036;//0x36,0x00,0x47,0x00,
	data_array[4] = 0x00820066;//0x66,0x00,0x82,0x00
	data_array[5] = 0x01DA00B2;//0xB2,0x00,0xDA,0x01
	data_array[6] = 0x0151011B;//0x1B,0x01,0x51,0x01
	data_array[7] = 0x01ED01A5;//0xA5,0x01,0xED,0x01
	data_array[8] = 0x023002EE;//0xEE,0x02,0x30,0x02
	data_array[9] = 0x029E0275;//0x75,0x02,0x9E,0x02
	data_array[10] = 0x03F902D7;//,0xD7,0x02,0xF9,0x03
	data_array[11] = 0x03470328;//0x28,0x03,0x47,0x03
	data_array[12] = 0x0381036C;//0x6C,0x03,0x81,0x03
	data_array[13] = 0x03C00390;//0x90,0x03,0xC0,0x03,
	data_array[14] = 0x000000F8;//0xF8
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x004800D2;//D2,0x00,0x48,0x00,
	data_array[2] = 0x005F0050;//0x50,0x00,0x5F,0x00
	data_array[3] = 0x007A006D;//0x6D,0x00,0x7A,0x00
	data_array[4] = 0x00AB0094;//0x94,0x00,0xAB,0x00
	data_array[5] = 0x01F700D4;//0xD4,0x00,0xF7,0x01
	data_array[6] = 0x01610131;//0x31,0x01,0x61,0x01
	data_array[7] = 0x01F701B2;//0xB2,0x01,0xF7,0x01
	data_array[8] = 0x023802F9;//0xF9,0x02,0x38,0x02
	data_array[9] = 0x02A4027C;//0x7C,0x02,0xA4,0x02
	data_array[10] = 0x03FF02DE;//,0xDE,0x02,0xFF,0x03
	data_array[11] = 0x034D0330;//0x30,0x03,0x4D,0x03
	data_array[12] = 0x038A0372;//0x72,0x03,0x8A,0x03
	data_array[13] = 0x03C003A6;//0xA6,0x03,0xC0,0x03
	data_array[14] = 0x000000F8;//0xF8
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x000000D3;//D3,0x00,0x00,0x00,
	data_array[2] = 0x0023000C;//0x0C,0x00,0x23,0x00
	data_array[3] = 0x004A0037;//0x37,0x00,0x4A,0x00,
	data_array[4] = 0x00850069;//0x69,0x00,0x85,0x00
	data_array[5] = 0x01E000B7;//0xB7,0x00,0xE0,0x01
	data_array[6] = 0x015710121;//0x21,0x01,0x57,0x01
	data_array[7] = 0x01F301AC;//0xAC,0x01,0xF3,0x01
	data_array[8] = 0x023102F5;//0xF5,0x02,0x31,0x02
	data_array[9] = 0x02A10278;//0x78,0x02,0xA1,0x02
	data_array[10] = 0x03F802D7;//,0xD7,0x02,0xF8,0x03
	data_array[11] = 0x03480326;//0x26,0x03,0x48,0x03
	data_array[12] = 0x0371036A;//0x6A,0x03,0x71,0x03
	data_array[13] = 0x0F700376;//0x76,0x03,0xF7,0x03,
	data_array[14] = 0x000000F8;//0xF8
	dsi_set_cmdq(data_array, 15, 1);


	data_array[0] = 0x00353902;
	data_array[1] = 0x000000D4;//D1,0x00,0x00,0x00,
	data_array[2] = 0x0022000C;//0x0C,0x00,0x22,0x00
	data_array[3] = 0x00470036;//0x36,0x00,0x47,0x00,
	data_array[4] = 0x00820066;//0x66,0x00,0x82,0x00
	data_array[5] = 0x01DA00B2;//0xB2,0x00,0xDA,0x01
	data_array[6] = 0x0151011B;//0x1B,0x01,0x51,0x01
	data_array[7] = 0x01ED01A5;//0xA5,0x01,0xED,0x01
	data_array[8] = 0x023002EE;//0xEE,0x02,0x30,0x02
	data_array[9] = 0x029E0275;//0x75,0x02,0x9E,0x02
	data_array[10] = 0x03F902D7;//,0xD7,0x02,0xF9,0x03
	data_array[11] = 0x03470328;//0x28,0x03,0x47,0x03
	data_array[12] = 0x0381036C;//0x6C,0x03,0x81,0x03
	data_array[13] = 0x03C00390;//0x90,0x03,0xC0,0x03,
	data_array[14] = 0x000000F8;//0xF8
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x004800D5;//D2,0x00,0x48,0x00,
	data_array[2] = 0x005F0050;//0x50,0x00,0x5F,0x00
	data_array[3] = 0x007A006D;//0x6D,0x00,0x7A,0x00
	data_array[4] = 0x00AB0094;//0x94,0x00,0xAB,0x00
	data_array[5] = 0x01F700D4;//0xD4,0x00,0xF7,0x01
	data_array[6] = 0x01610131;//0x31,0x01,0x61,0x01
	data_array[7] = 0x01F701B2;//0xB2,0x01,0xF7,0x01
	data_array[8] = 0x023802F9;//0xF9,0x02,0x38,0x02
	data_array[9] = 0x02A4027C;//0x7C,0x02,0xA4,0x02
	data_array[10] = 0x03FF02DE;//,0xDE,0x02,0xFF,0x03
	data_array[11] = 0x034D0330;//0x30,0x03,0x4D,0x03
	data_array[12] = 0x038A0372;//0x72,0x03,0x8A,0x03
	data_array[13] = 0x03C003A6;//0xA6,0x03,0xC0,0x03
	data_array[14] = 0x000000F8;//0xF8
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x000000D6;//D3,0x00,0x00,0x00,
	data_array[2] = 0x0023000C;//0x0C,0x00,0x23,0x00
	data_array[3] = 0x004A0037;//0x37,0x00,0x4A,0x00,
	data_array[4] = 0x00850069;//0x69,0x00,0x85,0x00
	data_array[5] = 0x01E000B7;//0xB7,0x00,0xE0,0x01
	data_array[6] = 0x015710121;//0x21,0x01,0x57,0x01
	data_array[7] = 0x01F301AC;//0xAC,0x01,0xF3,0x01
	data_array[8] = 0x023102F5;//0xF5,0x02,0x31,0x02
	data_array[9] = 0x02A10278;//0x78,0x02,0xA1,0x02
	data_array[10] = 0x03F802D7;//,0xD7,0x02,0xF8,0x03
	data_array[11] = 0x03480326;//0x26,0x03,0x48,0x03
	data_array[12] = 0x0371036A;//0x6A,0x03,0x71,0x03
	data_array[13] = 0x0F700376;//0x76,0x03,0xF7,0x03,
	data_array[14] = 0x000000F8;//0xF8
	dsi_set_cmdq(data_array, 15, 1);
	//Gamma

	data_array[0] = 0x00063902;
	data_array[1] = 0x52AA55F0;
	data_array[2] = 0x00000008;
	dsi_set_cmdq(data_array, 3, 1);
	
	data_array[0] = 0x03B61500;
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x6CB51500;
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x00033902;
	data_array[1] = 0x007373B7;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00053902;
	data_array[1] = 0x060601B8;
	data_array[2] = 0x00000006;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00BC1500;
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x010063B1;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x10B41500;
	dsi_set_cmdq(data_array, 1, 1);

#else
//*******for NT35512_TM045YDH05_12.07.13************// 
	data_array[0] = 0x00053902;
	data_array[1] = 0xA555AAFF;
	data_array[2] = 0x00000080;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00103902;
	data_array[1] = 0x004063F7;
	data_array[2] = 0xC4010000;
	data_array[3] = 0x640200A2;
	data_array[4] = 0xD0004854;//0x54,0x48,0x00,0xD0
	dsi_set_cmdq(data_array, 5, 1);

	data_array[0] = 0x00053902;
	data_array[1] = 0xA555AAFF;//0xFF,0xAA, 0x55, 0xA5
	data_array[2] = 0x00000000;
	dsi_set_cmdq(data_array, 3, 1);

	// 2
	data_array[0] = 0x00063902;
	data_array[1] = 0x52AA55F0;//0Xf0 0x55, 0xAA, 0x52  page 1
	data_array[2] = 0x00000108;//0x08, 0x01
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x12B01500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x12B11500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x00B21500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x07B31500;dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0x14B61500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x14B71500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x24B81500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x34B91500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x14BA1500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x01BF1500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x04C31500;dsi_set_cmdq(data_array, 1, 1);
	data_array[0] = 0x00C21500;dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0x00033902;
	data_array[1] = 0x000804C0;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x007000BC;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x007000BD;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00033902;
	data_array[1] = 0x003d00BE;
	dsi_set_cmdq(data_array, 2, 1);

	//Gamma
	data_array[0] = 0x00353902;
	data_array[1] = 0x002900D1;//D1,0x00,0x00,0x00,
	data_array[2] = 0x00330030;//0x0C,0x00,0x22,0x00
	data_array[3] = 0x00770052;//0x36,0x00,0x47,0x00,
	data_array[4] = 0x01d700b0;//0x66,0x00,0x82,0x00
	data_array[5] = 0x013A0110;//0xB2,0x00,0xDA,0x01
	data_array[6] = 0x01a20177;//0x1B,0x01,0x51,0x01
	data_array[7] = 0x020f02e0;//0xA5,0x01,0xED,0x01
	data_array[8] = 0x02390210;//0xEE,0x02,0x30,0x02
	data_array[9] = 0x027a0263;//0x75,0x02,0x9E,0x02
	data_array[10] = 0x02a40294;//,0xD7,0x02,0xF9,0x03
	data_array[11] = 0x02c502b8;//0x28,0x03,0x47,0x03
	data_array[12] = 0x02dd02d4;//0x6C,0x03,0x81,0x03
	data_array[13] = 0x03fb02e8;//0x90,0x03,0xC0,0x03,
	data_array[14] = 0x00000060;//0xF8
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x002900D2;//D1,0x00,0x00,0x00,
	data_array[2] = 0x00330030;//0x0C,0x00,0x22,0x00
	data_array[3] = 0x00770052;//0x36,0x00,0x47,0x00,
	data_array[4] = 0x01d700b0;//0x66,0x00,0x82,0x00
	data_array[5] = 0x013A0110;//0xB2,0x00,0xDA,0x01
	data_array[6] = 0x01a20177;//0x1B,0x01,0x51,0x01
	data_array[7] = 0x020f02e0;//0xA5,0x01,0xED,0x01
	data_array[8] = 0x02390210;//0xEE,0x02,0x30,0x02
	data_array[9] = 0x027a0263;//0x75,0x02,0x9E,0x02
	data_array[10] = 0x02a40294;//,0xD7,0x02,0xF9,0x03
	data_array[11] = 0x02c502b8;//0x28,0x03,0x47,0x03
	data_array[12] = 0x02dd02d4;//0x6C,0x03,0x81,0x03
	data_array[13] = 0x03fb02e8;//0x90,0x03,0xC0,0x03,
	data_array[14] = 0x00000000;//0xF8
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x002900D3;//D1,0x00,0x00,0x00,
	data_array[2] = 0x00330030;//0x0C,0x00,0x22,0x00
	data_array[3] = 0x00770052;//0x36,0x00,0x47,0x00,
	data_array[4] = 0x01d700b0;//0x66,0x00,0x82,0x00
	data_array[5] = 0x013A0110;//0xB2,0x00,0xDA,0x01
	data_array[6] = 0x01a20177;//0x1B,0x01,0x51,0x01
	data_array[7] = 0x020f02e0;//0xA5,0x01,0xED,0x01
	data_array[8] = 0x02390210;//0xEE,0x02,0x30,0x02
	data_array[9] = 0x027a0263;//0x75,0x02,0x9E,0x02
	data_array[10] = 0x02a40294;//,0xD7,0x02,0xF9,0x03
	data_array[11] = 0x02c502b8;//0x28,0x03,0x47,0x03
	data_array[12] = 0x02dd02d4;//0x6C,0x03,0x81,0x03
	data_array[13] = 0x02fb02e8;//0x90,0x03,0xC0,0x03,
	data_array[14] = 0x000000d0;//0xF8
	dsi_set_cmdq(data_array, 15, 1);


	data_array[0] = 0x00353902;
	data_array[1] = 0x002900D4;//D1,0x00,0x00,0x00,
	data_array[2] = 0x00330030;//0x0C,0x00,0x22,0x00
	data_array[3] = 0x00770052;//0x36,0x00,0x47,0x00,
	data_array[4] = 0x01d700b0;//0x66,0x00,0x82,0x00
	data_array[5] = 0x013A0110;//0xB2,0x00,0xDA,0x01
	data_array[6] = 0x01a20177;//0x1B,0x01,0x51,0x01
	data_array[7] = 0x020f02e0;//0xA5,0x01,0xED,0x01
	data_array[8] = 0x02390210;//0xEE,0x02,0x30,0x02
	data_array[9] = 0x027a0263;//0x75,0x02,0x9E,0x02
	data_array[10] = 0x02a40294;//,0xD7,0x02,0xF9,0x03
	data_array[11] = 0x02c502b8;//0x28,0x03,0x47,0x03
	data_array[12] = 0x02dd02d4;//0x6C,0x03,0x81,0x03
	data_array[13] = 0x03fb02e8;//0x90,0x03,0xC0,0x03,
	data_array[14] = 0x00000060;//0xF8
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x002900D5;//D1,0x00,0x00,0x00,
	data_array[2] = 0x00330030;//0x0C,0x00,0x22,0x00
	data_array[3] = 0x00770052;//0x36,0x00,0x47,0x00,
	data_array[4] = 0x01d700b0;//0x66,0x00,0x82,0x00
	data_array[5] = 0x013A0110;//0xB2,0x00,0xDA,0x01
	data_array[6] = 0x01a20177;//0x1B,0x01,0x51,0x01
	data_array[7] = 0x020f02e0;//0xA5,0x01,0xED,0x01
	data_array[8] = 0x02390210;//0xEE,0x02,0x30,0x02
	data_array[9] = 0x027a0263;//0x75,0x02,0x9E,0x02
	data_array[10] = 0x02a40294;//,0xD7,0x02,0xF9,0x03
	data_array[11] = 0x02c502b8;//0x28,0x03,0x47,0x03
	data_array[12] = 0x02dd02d4;//0x6C,0x03,0x81,0x03
	data_array[13] = 0x03fb02e8;//0x90,0x03,0xC0,0x03,
	data_array[14] = 0x00000000;//0xF8
	dsi_set_cmdq(data_array, 15, 1);

	data_array[0] = 0x00353902;
	data_array[1] = 0x002900D6;//D1,0x00,0x00,0x00,
	data_array[2] = 0x00330030;//0x0C,0x00,0x22,0x00
	data_array[3] = 0x00770052;//0x36,0x00,0x47,0x00,
	data_array[4] = 0x01d700b0;//0x66,0x00,0x82,0x00
	data_array[5] = 0x013A0110;//0xB2,0x00,0xDA,0x01
	data_array[6] = 0x01a20177;//0x1B,0x01,0x51,0x01
	data_array[7] = 0x020f02e0;//0xA5,0x01,0xED,0x01
	data_array[8] = 0x02390210;//0xEE,0x02,0x30,0x02
	data_array[9] = 0x027a0263;//0x75,0x02,0x9E,0x02
	data_array[10] = 0x02a40294;//,0xD7,0x02,0xF9,0x03
	data_array[11] = 0x02c502b8;//0x28,0x03,0x47,0x03
	data_array[12] = 0x02dd02d4;//0x6C,0x03,0x81,0x03
	data_array[13] = 0x02fb02e8;//0x90,0x03,0xC0,0x03,
	data_array[14] = 0x000000d0;//0xF8
	dsi_set_cmdq(data_array, 15, 1);
	//Gamma

	data_array[0] = 0x00063902;
	data_array[1] = 0x52AA55F0;   //page 0
	data_array[2] = 0x00000008;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x10B41500;   //color enhance
	dsi_set_cmdq(data_array, 1, 1);
	
	data_array[0] = 0x05B61500;
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x6CB51500;
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x02BC1500;    // 2-dot
	dsi_set_cmdq(data_array, 1, 1);

	data_array[0] = 0x00043902;
	data_array[1] = 0x000014B1;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00063902;
	data_array[1] = 0x500200c9;
	data_array[2] = 0x00005050;
	dsi_set_cmdq(data_array, 3, 1);

	data_array[0] = 0x00033902;
	data_array[1] = 0x008080B7;
	dsi_set_cmdq(data_array, 2, 1);

	data_array[0] = 0x00053902;
	data_array[1] = 0x070701B8;
	data_array[2] = 0x00000007;
	dsi_set_cmdq(data_array, 3, 1);





	//data_array[0] = 0x10B41500;
	//dsi_set_cmdq(&data_array, 1, 1);

	// push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1);
#endif
}
Esempio n. 23
0
static void lcm_resume(void)
{
#if 0
    set_lcm_register(0x00, 0x0000);
    set_lcm_register(0x01, 0x0100);
    set_lcm_register(0x03, 0x10B0);
    set_lcm_register(0x02, 0x0700);   // set N_line inversion
    
    set_lcm_register(0x04, 0x0000);
    set_lcm_register(0x08, 0x0207);
    set_lcm_register(0x09, 0x0000);
    set_lcm_register(0x0A, 0x0000);
    set_lcm_register(0x0C, 0x0000);
    set_lcm_register(0x0D, 0x0000);
    set_lcm_register(0x0F, 0x0000);
    set_lcm_register(0x07, 0x0101);
    
    set_lcm_register(0x10, 0x10B0);   // 0x12B0 power control  start
    MDELAY(0x20);                       // delay 20ms for voltage setup
    set_lcm_register(0x11, 0x0007);
    MDELAY(0x20);
    set_lcm_register(0x17, 0x0001);
    MDELAY(0x20);
    set_lcm_register(0x12, 0x01B9);   // 0x01BD
    MDELAY(0x20);
    set_lcm_register(0x13, 0x0A00);   // 0x1800
    MDELAY(0x20);
    set_lcm_register(0x29, 0x0008);   // 0x0019 power control end
    MDELAY(0x20);
    
    set_lcm_register(0x30, 0x0002);   // Gamma 2.4 start
    set_lcm_register(0x31, 0x0720);
    set_lcm_register(0x32, 0x0924);
    set_lcm_register(0x33, 0x3F10);
    set_lcm_register(0x34, 0x3D06);
    set_lcm_register(0x35, 0x1003);
    set_lcm_register(0x36, 0x0507);
    set_lcm_register(0x37, 0x0411);
    set_lcm_register(0x38, 0x0005);
    set_lcm_register(0x39, 0x0003);
    set_lcm_register(0x3A, 0x0805);
    set_lcm_register(0x3B, 0x0B02);
    set_lcm_register(0x3C, 0x040F);
    set_lcm_register(0x3D, 0x050C);
    set_lcm_register(0x3E, 0x0103);
    set_lcm_register(0x3F, 0x0401);   // Gamma 2.4 end
    
    set_lcm_register(0x50, 0x0000);
    set_lcm_register(0x51, 0x00EF);
    set_lcm_register(0x52, 0x0000);
    set_lcm_register(0x53, 0x013F);
    
    set_lcm_register(0x60, 0x2700);
    set_lcm_register(0x61, 0x0001);
    set_lcm_register(0x6A, 0x0000);
    
    set_lcm_register(0x80, 0x0000);
    set_lcm_register(0x81, 0x0000);
    set_lcm_register(0x82, 0x0000);
    set_lcm_register(0x83, 0x0000);
    set_lcm_register(0x84, 0x0000);
    set_lcm_register(0x85, 0x0000);
    
    set_lcm_register(0x90, 0x0012);
    set_lcm_register(0x92, 0x0000);
    set_lcm_register(0x93, 0x0103);
    set_lcm_register(0x95, 0x0110);
    set_lcm_register(0x97, 0x0000);
    set_lcm_register(0x98, 0x0000);
    
    set_lcm_register(0xF0, 0x5408);
    set_lcm_register(0xF2, 0x00DF);   // green, blue point CR
    set_lcm_register(0xF3, 0x0007);
    set_lcm_register(0xF4, 0x001F);
    set_lcm_register(0xF0, 0x0000);
#endif
    set_lcm_register(0x10, 0x10B0);
    MDELAY(25);
    set_lcm_register(0x07, 0x0173);
    MDELAY(175);
}
Esempio n. 24
0
static void InitLCD_ILI9481_HVGA_CPT32()
{
  dbg_print("===> [ILI9481_DPI] <%s %s> %s:%d %s(): :  \n", __DATE__, __TIME__, __FILE__, __LINE__, __func__); 
  //************* Start Initial Sequence **********//
  MDELAY(100); // Delay 100 ms
  LCD_WRITE_CMD(0x11); //Exit Sleep
  MDELAY(20);

  LCD_WRITE_CMD(0xD0); //Power Setting
  LCD_WRITE_DATA(0x07);
  LCD_WRITE_DATA(0x42);
  LCD_WRITE_DATA(0x18);

  LCD_WRITE_CMD(0xD1); //Vcom control
  LCD_WRITE_DATA(0x00);
  LCD_WRITE_DATA(0x16);//07
  LCD_WRITE_DATA(0x0E);

  LCD_WRITE_CMD(0xD2); //Power setting for Normal mode
  LCD_WRITE_DATA(0x01);
  LCD_WRITE_DATA(0x02);

  LCD_WRITE_CMD(0xC0); //Panel Driver setting.
  LCD_WRITE_DATA(0x10);
  LCD_WRITE_DATA(0x3B);
  LCD_WRITE_DATA(0x00);
  LCD_WRITE_DATA(0x02);
  LCD_WRITE_DATA(0x11);

  LCD_WRITE_CMD(0xC5); //Frame rate and inversion control
  LCD_WRITE_DATA(0x03);

  LCD_WRITE_CMD(0xC8); //Gamma setting
  LCD_WRITE_DATA(0x00);
  LCD_WRITE_DATA(0x32);
  LCD_WRITE_DATA(0x36);
  LCD_WRITE_DATA(0x45);
  LCD_WRITE_DATA(0x06);
  LCD_WRITE_DATA(0x16);
  LCD_WRITE_DATA(0x37);
  LCD_WRITE_DATA(0x75);
  LCD_WRITE_DATA(0x77);
  LCD_WRITE_DATA(0x54);
  LCD_WRITE_DATA(0x0C);
  LCD_WRITE_DATA(0x00);

  LCD_WRITE_CMD(0x36); //Set address mode
  //LCD_WRITE_DATA(0x0A);
  LCD_WRITE_DATA(0x09); //Flip Vertically and Horizontally
  
  LCD_WRITE_CMD(0x3A);// set pixel format
  LCD_WRITE_DATA(0x66);

  //  LCD_WRITE_CMD(0x0C); //get pixel format
  //  LCD_WRITE_DATA(0x66);

  LCD_WRITE_CMD(0x2A); //set colum address
  LCD_WRITE_DATA(0x00);
  LCD_WRITE_DATA(0x00);
  LCD_WRITE_DATA(0x01);
  LCD_WRITE_DATA(0x40);
  
  LCD_WRITE_CMD(0x2B);//set page address
  LCD_WRITE_DATA(0x00);
  LCD_WRITE_DATA(0x00);
  LCD_WRITE_DATA(0x01);
  LCD_WRITE_DATA(0xE0);
  MDELAY(120);

  LCD_WRITE_CMD(0xB4); //Display mode and Frame memory write mode setting.
  LCD_WRITE_DATA(0x10);

  LCD_WRITE_CMD(0x29);//set display on 

  LCD_WRITE_CMD(0x2C);// write memory start
}
Esempio n. 25
0
static void init_lcm_registers(void)
{
	unsigned int data_array[16];

#if defined(LCM_DSI_CMD_MODE)
	{
		data_array[0]=0x00043902;
		data_array[1]=0x6983FFB9;
		dsi_set_cmdq(&data_array, 2, 1);
		MDELAY(10);

		data_array[0]=0x00103902;
		data_array[1]=0x032000B2;
		data_array[2]=0xFF007003;
		data_array[3]=0x00000000;
		data_array[4]=0x01000303;
		dsi_set_cmdq(&data_array, 5, 1);
		MDELAY(10);

		data_array[0]=0x00063902;
		data_array[1]=0x700800B4;
		data_array[2]=0x0000060E;
		dsi_set_cmdq(&data_array, 3, 1);
		MDELAY(10);

		data_array[0] = 0x001B3902;
		data_array[1] = 0x030100D5;
		data_array[2] = 0x08020100;
		data_array[3] = 0x00131180;
		data_array[4] = 0x51064000;
		data_array[5] = 0x71000007;
		data_array[6] = 0x07046005;
		data_array[7] = 0x0000060F;
		dsi_set_cmdq(&data_array, 8, 1);
		MDELAY(10);

		data_array[0] = 0x00143902;
		data_array[1] = 0x340085B1;
		data_array[2] = 0x0E0E0006;
		data_array[3] = 0x1A1A2C24;
		data_array[4] = 0xE6013A07;
		data_array[5] = 0xE6E6E6E6;
		dsi_set_cmdq(&data_array, 6, 1);
		MDELAY(10);

		// color format
		{
			// RGB565
			//data_array[0] = 0x053A1500;
			// RGB666
			//data_array[0] = 0x063A1500;
			// RGB888
			data_array[0] = 0x073A1500;
			dsi_set_cmdq(&data_array, 1, 1);
			MDELAY(10);
		}

		data_array[0] = 0x02CC1500;
		dsi_set_cmdq(&data_array, 1, 1);
		MDELAY(10);

		data_array[0] = 0x00033902;
		data_array[1] = 0x006C6CB6	;
		dsi_set_cmdq(&data_array, 2, 1);
		MDELAY(10);

		// ENABLE FMARK
		//data_array[0] = 0x00023902;
		//data_array[1] = 0x00000035	;
		//dsi_set_cmdq(&data_array, 2, 1);
		//MDELAY(10);

		//data_array[0] = 0x00351500;
		//dsi_set_cmdq(&data_array, 1, 1);
		//MDELAY(10);

		// SET GAMMA
		data_array[0] = 0x00233902;
		data_array[1] = 0x140C00E0;
		data_array[2] = 0x293F3F3F;
		data_array[3] = 0x0F0C0654;
		data_array[4] = 0x15131513;
		data_array[5] = 0x0C001F14;
		data_array[6] = 0x3F3F3F14;
		data_array[7] = 0x0C065429;
		data_array[8] = 0x1315130F;
		data_array[9] = 0x001F1415;
		dsi_set_cmdq(&data_array, 10, 1);
		MDELAY(10);

		data_array[0] = 0x000E3902; //// SET MIPI (1 or 2 Lane)
		data_array[1] = 0xC6A000BA	;
		data_array[2] = 0x10000A00	;
		if (0)//(g_LaneNumber==1)
		{
			data_array[3] = 0x10026F30;
		}
		else
		{
			data_array[3] = 0x11026F30;
		}
		data_array[4] = 0x00004018	;
		dsi_set_cmdq(&data_array, 5, 1);
		MDELAY(10);

		data_array[0] = 0x00110500;	// Sleep Out
		dsi_set_cmdq(&data_array, 1, 1);
		MDELAY(100);

		data_array[0] = 0x00290500;	// Display On
		dsi_set_cmdq(&data_array, 1, 1);
		MDELAY(10);

	}
#else
	{
		data_array[0] = 0x00043902; // SET password
		data_array[1] = 0x6983FFB9; //
		dsi_set_cmdq(&data_array, 2, 1);
		MDELAY(10);

		data_array[0] = 0x00143902; //// SET Power
		data_array[1] = 0x340085B1; //
		data_array[2] = 0x0F0F0007; //
		data_array[3] = 0x3F3F322A; //
		data_array[4] = 0xE6013A01; //
		data_array[5] = 0xE6E6E6E6;
		dsi_set_cmdq(&data_array, 6, 1);
		MDELAY(10);

		data_array[0] = 0x00103902; //// SET Display 480x800
		data_array[1] = 0x032300B2; //
		data_array[2] = 0xFF007003; //
		data_array[3] = 0x00000000; //
		data_array[4] = 0x01000303; //
		dsi_set_cmdq(&data_array, 5, 1);
		MDELAY(10);

		data_array[0] = 0x00063902; // SET Display
		data_array[1] = 0x801800B4;
		data_array[2] = 0x00000206;
		dsi_set_cmdq(&data_array, 3, 1);
		MDELAY(10);

		data_array[0] = 0x00033902; //// SET VCOM
		data_array[1] = 0x004242B6; 
		dsi_set_cmdq(&data_array, 2, 1);
		MDELAY(10);

		data_array[0] = 0x001B3902; //// SET GIP
		data_array[1] = 0x030400D5; 
		data_array[2] = 0x28050100; 
		data_array[3] = 0x00030170; 
		data_array[4] = 0x51064000; 
		data_array[5] = 0x41000007;
		data_array[6] = 0x07075006;
		data_array[7] = 0x0000040F;
		dsi_set_cmdq(&data_array, 8, 1);
		MDELAY(10);

		data_array[0] = 0x00233902; //// SET GAMMA
		data_array[1] = 0x191300E0; //
		data_array[2] = 0x283F3D38; //
		data_array[3] = 0x0E0D0746; //
		data_array[4] = 0x14121512; //
		data_array[5] = 0x1300170F;
		data_array[6] = 0x3F3D3819;
		data_array[7] = 0x0D074628;
		data_array[8] = 0x1215120E;
		data_array[9] = 0x00170F14;
		dsi_set_cmdq(&data_array, 10, 1);
		MDELAY(10);

#if 0
		switch(g_ColorFormat)
		{
			case PACKED_RGB565:
				data_array[0] = 0x553A1500; // SET pixel format
			break;
			
			case LOOSED_RGB666:
				data_array[0] = 0x663A1500; // SET pixel format
			break; 
			
			case PACKED_RGB888:
				data_array[0] = 0x773A1500; // SET pixel format
			break;
			
			case PACKED_RGB666:
				data_array[0] = 0x663A1500; // SET pixel format
			break;   		

			default:
				//dbg_print("Format setting error \n\r");
				while(1);
			break;
		}

		dsi_set_cmdq(&data_array, 1, 1);
		MDELAY(100);
#endif
		data_array[0] = 0x000E3902; // SET MIPI (1 or 2 Lane)
		data_array[1] = 0xC6A000BA; //
		data_array[2] = 0x10000A00; //
		if (0)//(g_LaneNumber==1)
		{
			data_array[3] = 0x10026F30;
		}
		else
		{
			data_array[3] = 0x11026F30;
		}
		data_array[4] = 0x00004018;
		dsi_set_cmdq(&data_array, 5, 1);
		MDELAY(10);

		data_array[0] = 0x00110500;		// Sleep Out
		dsi_set_cmdq(&data_array, 1, 1);
		MDELAY(10);

		data_array[0] = 0x00290500;		// Display On
		dsi_set_cmdq(&data_array, 1, 1);
		MDELAY(10);
	}
#endif
	//------------------------------------------------------------------------
	// LUT for HX8369
	//------------------------------------------------------------------------
	if (1)//(g_ColorFormat==0)
	{
		data_array[0] = 0x00C13902; //Set Color LUT 1
		data_array[1] = 0x1008002D;
		data_array[2] = 0x30282018;               
		data_array[3] = 0x50484038;              
		data_array[4] = 0x70686058;                
		data_array[5] = 0x90888078;                
		data_array[6] = 0xB0A8A098;                
		data_array[7] = 0xD0C8C0B8;                
		data_array[8] = 0xF0E8E0D8;                
		data_array[9] = 0x000000FF;                
		data_array[10] = 0x00000000;              
		data_array[11] = 0x00000000;                
		data_array[12] = 0x00000000;               
		data_array[13] = 0x00000000;                
		data_array[14] = 0x00000000;               
		data_array[15] = 0x00000000;             
		dsi_set_cmdq(&data_array, 16, 1);
		MDELAY(10);

		data_array[0] = 0x00000000; //Set Color LUT 2
		data_array[1] = 0x08040000;
		data_array[2] = 0x1814100C;                
		data_array[3] = 0x2824201C;                
		data_array[4] = 0x3834302C;                
		data_array[5] = 0x4844403C;                
		data_array[6] = 0x5854504C;                
		data_array[7] = 0x6864605C;                
		data_array[8] = 0x7874706C;                
		data_array[9] = 0x8884807C;                
		data_array[10] = 0x9894908C;              
		data_array[11] = 0xA8A4A09C;                
		data_array[12] = 0xB8B4B0AC;               
		data_array[13] = 0xC8C4C0BC;                
		data_array[14] = 0xD8D4D0CC;               
		data_array[15] = 0xE8E4E0DC;               
		dsi_set_cmdq(&data_array, 16, 1);

		MDELAY(10);

		data_array[0] = 0xF8F4F0EC; //Set Color LUT 3
		data_array[1] = 0x100800FC;
		data_array[2] = 0x30282018;               
		data_array[3] = 0x50484038;               
		data_array[4] = 0x70686058;               
		data_array[5] = 0x90888078;               
		data_array[6] = 0xB0A8A098;               
		data_array[7] = 0xD0C8C0B8;               
		data_array[8] = 0xF0E8E0D8;               
		data_array[9] = 0x000000F8;               
		data_array[10] = 0x00000000;             
		data_array[11] = 0x00000000;               
		data_array[12] = 0x00000000;              
		data_array[13] = 0x00000000;               
		data_array[14] = 0x00000000;              
		data_array[15] = 0x00000000;             
		dsi_set_cmdq(&data_array, 16, 1);
		MDELAY(10);

		data_array[0] = 0x00000000; //Set Color LUT
		data_array[1] = 0x00000000;                                                                              
		dsi_set_cmdq(&data_array, 2, 1);                                                    
		MDELAY(10);
	}

}
Esempio n. 26
0
static void lcm_resume(void)
{
	send_ctrl_cmd(0x11);
	MDELAY(120);
}
Esempio n. 27
0
static void init_lcm_registers(void)
{
	unsigned int data_array[16];

        data_array[0] = 0x00062902;                          
        data_array[1] = 0x800043E0;
        data_array[2] = 0x00000000;
        dsi_set_cmdq(data_array, 3, 1);
        //MDELAY(1);

        data_array[0] = 0x00062902;                          
        data_array[1] = 0x40201cB5;
        data_array[2] = 0x00000000;
        //data_array[3] = 0x03240FFF;
        //data_array[4] = 0x20252421;
        //data_array[5] = 0x00000000;
        dsi_set_cmdq(data_array, 3, 1);
        //MDELAY(1);


        data_array[0] = 0x00062902;                          
        data_array[1] = 0x0F1601B6; 
        data_array[2] = 0x00001316;
        //data_array[3] = 0x26263E36;
        //data_array[4] = 0xE6010A57;
        dsi_set_cmdq(data_array, 3, 1); 
        //MDELAY(1);
#if 1
        data_array[0] = 0x00032902;                          
        data_array[1] = 0x000000C0; 
        //data_array[2] = 0x42410605; 
        //data_array[3] = 0x43424102;
        //data_array[4] = 0x60581947;
        //data_array[5] = 0x00108508;
        dsi_set_cmdq(data_array, 2, 1);
        //MDELAY(1);

        data_array[0] = 0x00C12300;                          
        //data_array[1] = 0x000000C1; 
        //data_array[2] = 0xEF23CD00;
        //data_array[3] = 0xAB896745;
        //data_array[4] = 0x10DC0011;
        //data_array[5] = 0x98BA32FE;
        //data_array[6] = 0x11005476;
        //data_array[7] = 0x00000040;
        dsi_set_cmdq(data_array, 1, 1); 
        //MDELAY(1);

        data_array[0] = 0x000A2902;                          
        data_array[1] = 0x100901C3; 
        data_array[2] = 0x40660012;
        data_array[3] = 0x00000032; 
        dsi_set_cmdq(data_array, 4, 1);
        //MDELAY(1);

        data_array[0] = 0x00062902;                          
        data_array[1] = 0x182422C4;
        data_array[2] = 0x00005218;
        dsi_set_cmdq(data_array, 3, 1);
        data_array[0] = 0x00032902;                          
        data_array[1] = 0x004042C6;
        dsi_set_cmdq(data_array, 2, 1);
        //MDELAY(1);
#endif
        data_array[0] = 0x000A2902;                          
        data_array[1] = 0x641101D0; 
        data_array[2] = 0x51061835;
        data_array[3] = 0x00000232; 
        dsi_set_cmdq(data_array, 4, 1);
        //MDELAY(1);

        data_array[0] = 0x000A2902;                          
        data_array[1] = 0x641420D1; 
        data_array[2] = 0x71050134;
        data_array[3] = 0x00000433; 
        dsi_set_cmdq(data_array, 4, 1);
        //MDELAY(1);

        data_array[0] = 0x000A2902;                          
        data_array[1] = 0x641101D2; 
        data_array[2] = 0x51061835;
        data_array[3] = 0x00000232; 
        dsi_set_cmdq(data_array, 4, 1);
        //MDELAY(1);

        data_array[0] = 0x000A2902;                          
        data_array[1] = 0x641420D3; 
        data_array[2] = 0x71050134;
        data_array[3] = 0x00000433; 
        dsi_set_cmdq(data_array, 4, 1);
        //MDELAY(1);

        data_array[0] = 0x000A2902;                          
        data_array[1] = 0x641101D4; 
        data_array[2] = 0x51061835;
        data_array[3] = 0x00000232; 
        dsi_set_cmdq(data_array, 4, 1);
        //MDELAY(1);

        data_array[0] = 0x000A2902;                          
        data_array[1] = 0x641420D5; 
        data_array[2] = 0x71050134;
        data_array[3] = 0x00000433; 
        dsi_set_cmdq(data_array, 4, 1);
        //MDELAY(1);

        //data_array[0] = 0x08362300;                          
        //data_array[1] = 0x00000836; 
        //dsi_set_cmdq(data_array, 1, 1);
        //MDELAY(1);

#if 0
        data_array[0] = 0x00F92300;                          
        //data_array[1] = 0x000000F9; 
        dsi_set_cmdq(data_array, 1, 1);
        //MDELAY(1);

        //data_array[0] = 0x00B32300;                          
        //data_array[1] = 0x000002C2; 
        //dsi_set_cmdq(data_array, 1, 1);

        data_array[0] = 0x02C22300;                          
        //data_array[1] = 0x000002C2; 
        dsi_set_cmdq(data_array, 1, 1);
        MDELAY(10);

        data_array[0] = 0x06C22300;                          
        //data_array[1] = 0x000006C2; 
        dsi_set_cmdq(data_array, 1, 1);
        MDELAY(10);

        data_array[0] = 0x4EC22300;                          
        //data_array[1] = 0x00004EC2; 
        dsi_set_cmdq(data_array, 1, 1);
        MDELAY(80);
#endif
        data_array[0] = 0x00110500; // Sleep Out
        dsi_set_cmdq(data_array, 1, 1);
        MDELAY(50);

        data_array[0] = 0x00F92300;                          
        //data_array[1] = 0x000000F9; 
        dsi_set_cmdq(data_array, 1, 1);
        MDELAY(10);

        data_array[0] = 0x00290500; // Display On
        dsi_set_cmdq(data_array, 1, 1); 
	//MDELAY(10);
}
Esempio n. 28
0
static void init_lcm_registers(void)
{
#if 0
	send_ctrl_cmd(0x11); //Sleep Out
	MDELAY(300);

	send_ctrl_cmd(0xB4); //Set RM, DM
	send_data_cmd(0x00);

	send_ctrl_cmd(0xC8); //Set Gamma
	send_data_cmd(0x00);
	send_data_cmd(0x34);
	send_data_cmd(0x46);
	send_data_cmd(0x31);
	send_data_cmd(0x00);
	send_data_cmd(0x1A);
	send_data_cmd(0x12);
	send_data_cmd(0x34);
	send_data_cmd(0x77);
	send_data_cmd(0x13);
	send_data_cmd(0x0F);
	send_data_cmd(0x00);

	send_ctrl_cmd(0xD0); //Set Power
	send_data_cmd(0x51); //DDVDH  0X44
	send_data_cmd(0x42);
	send_data_cmd(0x0F); //VREG1  0X08

	send_ctrl_cmd(0xD1); //Set VCOM
	send_data_cmd(0x4F); //VCOMH
	send_data_cmd(0x1D); //VCOML

	send_ctrl_cmd(0xD2); //Set NOROW
	send_data_cmd(0x01); //SAP
	send_data_cmd(0x12); //DC10/00

	send_ctrl_cmd(0xE9); //Set Panel
	send_data_cmd(0x01);

	send_ctrl_cmd(0xEA); //Set STBA
	send_data_cmd(0x03);
	send_data_cmd(0x00);
	send_data_cmd(0x00);

	send_ctrl_cmd(0xEE); //Set EQ
	send_data_cmd(0x13);
	send_data_cmd(0x00);
	send_data_cmd(0x00);
	send_data_cmd(0x13);

	send_ctrl_cmd(0xED); //Set DIR TIM
	send_data_cmd(0x13);
	send_data_cmd(0x13);
	send_data_cmd(0xA2);
	send_data_cmd(0xA2);
	send_data_cmd(0xA3);
	send_data_cmd(0xA3);
	send_data_cmd(0x13);
	send_data_cmd(0x13);
	send_data_cmd(0x13);
	send_data_cmd(0x13);
	send_data_cmd(0xAE);
	send_data_cmd(0xAE);
	send_data_cmd(0x13);
	send_data_cmd(0xA2);
	send_data_cmd(0x13);

	send_ctrl_cmd(0x36);
	send_data_cmd(0x02);

	send_ctrl_cmd(0x3A);
	send_data_cmd(0x66);

	send_ctrl_cmd(0x51);//write display brightness
	send_data_cmd(0x70);//set brightness 0x00-0xff
	MDELAY(50);

	send_ctrl_cmd(0x53);//write ctrl display
	send_data_cmd(0x24);
	MDELAY(50);

	send_ctrl_cmd(0x55);
	send_data_cmd(0x01);//still picture
	MDELAY(50);

	send_ctrl_cmd(0x5e);//write CABC minumum brightness
	send_data_cmd(0x70);//
	MDELAY(50);

	send_ctrl_cmd(0xCA);  //Set UI GAIN
    send_data_cmd(0x24);
    send_data_cmd(0x24);
    send_data_cmd(0x24);
    send_data_cmd(0x23);
    send_data_cmd(0x23);
    send_data_cmd(0x23);
    send_data_cmd(0x22);
    send_data_cmd(0x22);
    send_data_cmd(0x22);
    send_data_cmd(0x22);

	send_ctrl_cmd(0x11);
	MDELAY(120);
#else
	MDELAY(10);
	send_ctrl_cmd(0x11);//Sleep Out
	MDELAY(120);

	send_ctrl_cmd(0xEE);//Set EQ
	send_data_cmd(0x02);
	send_data_cmd(0x01);
	send_data_cmd(0x02);
	send_data_cmd(0x01);

	send_ctrl_cmd(0xED);//Set DIR TIM
	send_data_cmd(0x00);
	send_data_cmd(0x00);
	send_data_cmd(0x9A);
	send_data_cmd(0x9A);
	send_data_cmd(0x9B);
	send_data_cmd(0x9B);
	send_data_cmd(0x00);
	send_data_cmd(0x00);
	send_data_cmd(0x00);
	send_data_cmd(0x00);
	send_data_cmd(0xAE);
	send_data_cmd(0xAE);
	send_data_cmd(0x01);
	send_data_cmd(0xA2);
	send_data_cmd(0x00);

	send_ctrl_cmd(0xB4);//Set RM, DM
	send_data_cmd(0x00);//

	send_ctrl_cmd(0xC0);  //Set Panel Driving
	send_data_cmd(0x10); //REV SM GS
	send_data_cmd(0x3B); // NL[5:0]
	send_data_cmd(0x00); //SCN[6:0]
	send_data_cmd(0x02); //NDL 0 PTS[2:0]
	send_data_cmd(0x11); //PTG ISC[3:0]

	send_ctrl_cmd(0xC8);//Set Gamma
	send_data_cmd(0x00);  //KP1,KP0
	send_data_cmd(0x46);  //KP3,KP2
	send_data_cmd(0x12);  //KP5,KP4
	send_data_cmd(0x20);  //RP1,RP0
	send_data_cmd(0x0c);  //VRP0  01
	send_data_cmd(0x00);  //VRP1
	send_data_cmd(0x56);  //KN1,KN0
	send_data_cmd(0x12);  //KN3,KN2
	send_data_cmd(0x67);  //KN5,KN4
	send_data_cmd(0x02);  //RN1,RN0
	send_data_cmd(0x00);  //VRN0
	send_data_cmd(0x0c);  //VRN1  01

	send_ctrl_cmd(0xD0);//Set Power
	send_data_cmd(0x44);//DDVDH :5.28
	send_data_cmd(0x44); // BT VGH:15.84    VGL:-7.92
	send_data_cmd(0x05);//VREG1  4.625V

	send_ctrl_cmd(0xD1);//Set VCOM
	send_data_cmd(0x4b); //VCOMH  3.367 //3B
	send_data_cmd(0x14);//VCOM  5.2725

	send_ctrl_cmd(0xD2);
	send_data_cmd(0x04);
	send_data_cmd(0x22); //12

	send_ctrl_cmd(0xD3);
	send_data_cmd(0x04);
	send_data_cmd(0x12);

	send_ctrl_cmd(0xD4);
	send_data_cmd(0x07);
	send_data_cmd(0x12);

	send_ctrl_cmd(0xE9); //Set Panel
	send_data_cmd(0x00);

	send_ctrl_cmd(0xC5); //Set Frame rate
	send_data_cmd(0x08);  //61.51Hz


	send_ctrl_cmd(0X0036);
	send_data_cmd(0X000a);

	send_ctrl_cmd(0X003A);
	send_data_cmd(0X0006);

	send_ctrl_cmd(0X002A);
	send_data_cmd(0X0000);
	send_data_cmd(0X0000);
	send_data_cmd(0X0001);
	send_data_cmd(0X003F);

	send_ctrl_cmd(0X002B);
	send_data_cmd(0X0000);
	send_data_cmd(0X0000);
	send_data_cmd(0X0001);
	send_data_cmd(0X00E0);
	MDELAY(120);

	send_ctrl_cmd(0x29); //Display On
	MDELAY(5);
#endif
}
Esempio n. 29
0
static void init_lcm_registers(void)
{
    send_ctrl_cmd(0x1100);

    MDELAY(200);

    send_ctrl_cmd(0xC000); send_data_cmd(0x86);
    send_ctrl_cmd(0xC001); send_data_cmd(0x00);
    send_ctrl_cmd(0xC002); send_data_cmd(0x86);
    send_ctrl_cmd(0xC003); send_data_cmd(0x00);
    send_ctrl_cmd(0xC100); send_data_cmd(0x45);
    send_ctrl_cmd(0xC200); send_data_cmd(0x21);
    send_ctrl_cmd(0xC202); send_data_cmd(0x02);
    send_ctrl_cmd(0xB600); send_data_cmd(0x30);
    send_ctrl_cmd(0xB602); send_data_cmd(0x30);
    send_ctrl_cmd(0xC700); send_data_cmd(0x8F);
    send_ctrl_cmd(0xE000); send_data_cmd(0x0E);
    send_ctrl_cmd(0xE001); send_data_cmd(0x14);
    
    send_ctrl_cmd(0xE002); send_data_cmd(0x29);
    send_ctrl_cmd(0xE003); send_data_cmd(0x3A);
    send_ctrl_cmd(0xE004); send_data_cmd(0x1D);
    send_ctrl_cmd(0xE005); send_data_cmd(0x30);
    send_ctrl_cmd(0xE006); send_data_cmd(0x61);
    send_ctrl_cmd(0xE007); send_data_cmd(0x3D);
    send_ctrl_cmd(0xE008); send_data_cmd(0x22);
    send_ctrl_cmd(0xE009); send_data_cmd(0x2A);
    send_ctrl_cmd(0xE00A); send_data_cmd(0x87);
    send_ctrl_cmd(0xE00B); send_data_cmd(0x16);
    send_ctrl_cmd(0xE00C); send_data_cmd(0x3B);
    send_ctrl_cmd(0xE00D); send_data_cmd(0x4C);
    send_ctrl_cmd(0xE00E); send_data_cmd(0x78);
    send_ctrl_cmd(0xE00F); send_data_cmd(0x96);
    send_ctrl_cmd(0xE010); send_data_cmd(0x4A);
    send_ctrl_cmd(0xE011); send_data_cmd(0x4D);
    send_ctrl_cmd(0xE100); send_data_cmd(0x0E);
    send_ctrl_cmd(0xE101); send_data_cmd(0x14);
    send_ctrl_cmd(0xE102); send_data_cmd(0x29);
    send_ctrl_cmd(0xE103); send_data_cmd(0x3A);
    send_ctrl_cmd(0xE104); send_data_cmd(0x1D);
    send_ctrl_cmd(0xE105); send_data_cmd(0x30);
    send_ctrl_cmd(0xE106); send_data_cmd(0x61);
    send_ctrl_cmd(0xE107); send_data_cmd(0x3F);
    send_ctrl_cmd(0xE108); send_data_cmd(0x20);
    send_ctrl_cmd(0xE109); send_data_cmd(0x26);
    send_ctrl_cmd(0xE10A); send_data_cmd(0x83);
    send_ctrl_cmd(0xE10B); send_data_cmd(0x16);
    send_ctrl_cmd(0xE10C); send_data_cmd(0x3B);
    send_ctrl_cmd(0xE10D); send_data_cmd(0x4C);
    send_ctrl_cmd(0xE10E); send_data_cmd(0x78);
    send_ctrl_cmd(0xE10F); send_data_cmd(0x96);
    send_ctrl_cmd(0xE110); send_data_cmd(0x4A);
    send_ctrl_cmd(0xE111); send_data_cmd(0x4D);
    send_ctrl_cmd(0xE200); send_data_cmd(0x0E);
    send_ctrl_cmd(0xE201); send_data_cmd(0x14);
    send_ctrl_cmd(0xE202); send_data_cmd(0x29);
    send_ctrl_cmd(0xE203); send_data_cmd(0x3A);
    send_ctrl_cmd(0xE204); send_data_cmd(0x1D);
    send_ctrl_cmd(0xE205); send_data_cmd(0x30);
    send_ctrl_cmd(0xE206); send_data_cmd(0x61);
    send_ctrl_cmd(0xE207); send_data_cmd(0x3D);
    send_ctrl_cmd(0xE208); send_data_cmd(0x22);
    send_ctrl_cmd(0xE209); send_data_cmd(0x2A);
    send_ctrl_cmd(0xE20A); send_data_cmd(0x87);
    send_ctrl_cmd(0xE20B); send_data_cmd(0x16);
    send_ctrl_cmd(0xE20C); send_data_cmd(0x3B);
    send_ctrl_cmd(0xE20D); send_data_cmd(0x4C);
    send_ctrl_cmd(0xE20E); send_data_cmd(0x78);
    send_ctrl_cmd(0xE20F); send_data_cmd(0x96);
    send_ctrl_cmd(0xE210); send_data_cmd(0x4A);
    send_ctrl_cmd(0xE211); send_data_cmd(0x4D);
    send_ctrl_cmd(0xE300); send_data_cmd(0x0E);
    send_ctrl_cmd(0xE301); send_data_cmd(0x14);
    
    send_ctrl_cmd(0xE302); send_data_cmd(0x29);
    send_ctrl_cmd(0xE303); send_data_cmd(0x3A);
    send_ctrl_cmd(0xE304); send_data_cmd(0x1D);
    send_ctrl_cmd(0xE305); send_data_cmd(0x30);
    send_ctrl_cmd(0xE306); send_data_cmd(0x61);
    send_ctrl_cmd(0xE307); send_data_cmd(0x3F);
    send_ctrl_cmd(0xE308); send_data_cmd(0x20);
    send_ctrl_cmd(0xE309); send_data_cmd(0x26);
    send_ctrl_cmd(0xE30A); send_data_cmd(0x83);
    send_ctrl_cmd(0xE30B); send_data_cmd(0x16);
    send_ctrl_cmd(0xE30C); send_data_cmd(0x3B);
    send_ctrl_cmd(0xE30D); send_data_cmd(0x4C);
    send_ctrl_cmd(0xE30E); send_data_cmd(0x78);
    send_ctrl_cmd(0xE30F); send_data_cmd(0x96);
    send_ctrl_cmd(0xE310); send_data_cmd(0x4A);
    send_ctrl_cmd(0xE311); send_data_cmd(0x4D);
    send_ctrl_cmd(0xE400); send_data_cmd(0x0E);
    send_ctrl_cmd(0xE401); send_data_cmd(0x14);
    send_ctrl_cmd(0xE402); send_data_cmd(0x29);
    send_ctrl_cmd(0xE403); send_data_cmd(0x3A);
    send_ctrl_cmd(0xE404); send_data_cmd(0x1D);
    send_ctrl_cmd(0xE405); send_data_cmd(0x30);
    send_ctrl_cmd(0xE406); send_data_cmd(0x61);
    send_ctrl_cmd(0xE407); send_data_cmd(0x3D);
    send_ctrl_cmd(0xE408); send_data_cmd(0x22);
    send_ctrl_cmd(0xE409); send_data_cmd(0x2A);
    send_ctrl_cmd(0xE40A); send_data_cmd(0x87);
    send_ctrl_cmd(0xE40B); send_data_cmd(0x16);
    send_ctrl_cmd(0xE40C); send_data_cmd(0x3B);
    send_ctrl_cmd(0xE40D); send_data_cmd(0x4C);
    send_ctrl_cmd(0xE40E); send_data_cmd(0x78);
    send_ctrl_cmd(0xE40F); send_data_cmd(0x96);
    send_ctrl_cmd(0xE410); send_data_cmd(0x4A);
    send_ctrl_cmd(0xE411); send_data_cmd(0x4D);
    send_ctrl_cmd(0xE500); send_data_cmd(0x0E);
    send_ctrl_cmd(0xE501); send_data_cmd(0x14);
    send_ctrl_cmd(0xE502); send_data_cmd(0x29);
    send_ctrl_cmd(0xE503); send_data_cmd(0x3A);
    send_ctrl_cmd(0xE504); send_data_cmd(0x1D);
    send_ctrl_cmd(0xE505); send_data_cmd(0x30);
    send_ctrl_cmd(0xE506); send_data_cmd(0x61);
    send_ctrl_cmd(0xE507); send_data_cmd(0x3F);
    send_ctrl_cmd(0xE508); send_data_cmd(0x20);
    send_ctrl_cmd(0xE509); send_data_cmd(0x26);
    send_ctrl_cmd(0xE50A); send_data_cmd(0x83);
    
    send_ctrl_cmd(0xE50B); send_data_cmd(0x16);
    send_ctrl_cmd(0xE50C); send_data_cmd(0x3B);
    send_ctrl_cmd(0xE50D); send_data_cmd(0x4C);
    send_ctrl_cmd(0xE50E); send_data_cmd(0x78);
    send_ctrl_cmd(0xE50F); send_data_cmd(0x96);
    send_ctrl_cmd(0xE510); send_data_cmd(0x4A);
    send_ctrl_cmd(0xE511); send_data_cmd(0x4D);
    send_ctrl_cmd(0x2900);

    MDELAY(200);
    
    send_ctrl_cmd(0x2C00);    
}
static void init_lcm_registers(void)
{
#if 0
	push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1);
#else
					/*ren_guan_20130722*/
		unsigned int data_array[25];         
        data_array[0]= 0x00043902; 
        data_array[1]= 0x6983FFB9; 
        dsi_set_cmdq(&data_array, 2, 1); 
        MDELAY(1);   
    
        data_array[0]= 0x00103902; 
        data_array[1]= 0x160031BA; 
        data_array[2]= 0x000AB1CA; 
        data_array[3]= 0x21022810; 
        data_array[4]= 0x8F1A9A21; 
        dsi_set_cmdq(&data_array, 5, 1); 
        MDELAY(1); 

        data_array[0]= 0x00023902; 
        data_array[1]= 0x0000703A; 
        dsi_set_cmdq(&data_array, 2, 1); 
        MDELAY(1);       

        data_array[0]= 0x005D3902; 
        data_array[1]= 0x080000d5; 
        data_array[2]= 0x00000A00; 
        data_array[3]= 0x00000110; 
        data_array[4]= 0x37490100; 
        data_array[5]= 0x0A0A0000; 
        data_array[6]= 0x0000470B; 
        data_array[7]= 0x00006000; 
				data_array[8]= 0x00000000; 
				data_array[9]= 0x00000300; 
				data_array[10]= 0x91000026; 
				data_array[11]= 0x75573513; 
				data_array[12]= 0x00000018; 
				data_array[13]= 0x20426486; 
				data_array[14]= 0x00004900; 
				data_array[15]= 0x24029000; 
				data_array[16]= 0x00086446; 
				data_array[17]= 0x75870000;// 
				data_array[18]= 0x59113153; 
				data_array[19]= 0x00000000; 
				data_array[20]= 0x00000001; 
				data_array[21]= 0xFF0F000F; 
				data_array[22]= 0x0F000FFF; 
				data_array[23]= 0x8000FFFF; 
				data_array[24]= 0x0000005A; 
        dsi_set_cmdq(&data_array, 25, 1); 
        MDELAY(1); 

        data_array[0]= 0x000B3902; 
        data_array[1]= 0x77830Cb1; 
        data_array[2]= 0x180f0F00; 
        data_array[3]= 0x00020C18; 
        dsi_set_cmdq(&data_array, 4, 1); 
        MDELAY(1); 
        
        data_array[0]= 0x00033902; 
        data_array[1]= 0x007000b2; 

        dsi_set_cmdq(&data_array, 2, 1); 
        MDELAY(1); 
    
        data_array[0]= 0x00053902; 
        data_array[1]= 0x310083b3; 
        data_array[2]= 0x00000003; 
        dsi_set_cmdq(&data_array, 3, 1); 
        MDELAY(1);   
    
        data_array[0]= 0x00023902; 
        data_array[1]= 0x000000b4; 
        dsi_set_cmdq(&data_array, 2, 1); 
        MDELAY(1); 
        
        data_array[0]= 0x00033902; 
        data_array[1]= 0x009a9ab6;//a0 
        dsi_set_cmdq(&data_array, 2, 1); 
        MDELAY(1); 

        data_array[0]= 0x00023902; 
        data_array[1]= 0x00006DCB; 
        dsi_set_cmdq(&data_array, 2, 1); 
        MDELAY(1); 
  
        data_array[0]= 0x00023902; 
        data_array[1]= 0x000002cc; //0e
        dsi_set_cmdq(&data_array, 2, 1); 
        MDELAY(1); 
        
        data_array[0]= 0x00043902; 
        data_array[1]= 0x7AFF41C6; 
        dsi_set_cmdq(&data_array, 2, 1); 
        MDELAY(1); 
        
        data_array[0]= 0x00043902; 
        data_array[1]= 0x000072EA; 
        dsi_set_cmdq(&data_array, 2, 1); 
        MDELAY(1); 
        
        data_array[0]= 0x00043902; 
        data_array[1]= 0x070F07E3; 
        data_array[2]= 0x0000000F; 
        dsi_set_cmdq(&data_array, 3, 1); 
        MDELAY(1); 

        data_array[0]= 0x00233902; 
        data_array[1]= 0x0C0700e0; 
        data_array[2]= 0x1C3f3230; 
        data_array[3]= 0x100D083A; 
        data_array[4]= 0x15141614; 
        data_array[5]= 0x0700120E; 
        data_array[6]= 0x3f32300C; 
        data_array[7]= 0x0D083A1C;//334b0913 
        data_array[8]= 0x14161410; 
        data_array[9]= 0x01120E15; 
        dsi_set_cmdq(&data_array, 10, 1); 
        MDELAY(1); 
        

        data_array[0] = 0x00110500;        //exit sleep mode 
        dsi_set_cmdq(&data_array, 1, 1); 
        MDELAY(150);   

        data_array[0] = 0x00290500;        //exit sleep mode 
        dsi_set_cmdq(&data_array, 1, 1); 
        MDELAY(20); 
#endif
}