Example #1
0
static unsigned int get_lcd_id_r(unsigned int addr)
{
	unsigned short id = 0;
	
	send_ctrl_cmd(addr);
    id = read_data_cmd();

	LCD_PRINT(LCM_NAME"get_lcd_id_r: id = 0x%x\n", id);
	return id;
}
Example #2
0
static unsigned int lcm_compare_id(void)
{
	unsigned int id=0;

	send_ctrl_cmd(0xD3);

	read_data_cmd();	//dummy code:0

	read_data_cmd();  // 0x00

	unsigned int param1 = 0;
	param1 =read_data_cmd(); //0x93

	unsigned int param2 =0;
	param2 = read_data_cmd(); //0x29

    	id = ((param1 & LCM_ID_MASK)<<8)|(param2);
    	return (LCM_ID == id)?1:0;
}
Example #3
0
static unsigned int lcm_compare_id(void)
{
	unsigned char read_buf[4];

	SET_RESET_PIN(1);
	SET_RESET_PIN(0);
	MDELAY(1);
	SET_RESET_PIN(1);
	MDELAY(10);

	send_ctrl_cmd(0x04);
	read_buf[0] = read_data_cmd();	/* dummy read */
	read_buf[1] = read_data_cmd();
	read_buf[2] = read_data_cmd();
	read_buf[3] = read_data_cmd();

	LCM_PRINT("[ST] ID : 0x%X, 0x%X, 0x%X\n", read_buf[1], read_buf[2], read_buf[3]);

	return ((LCM_ID0 == read_buf[1]) && (LCM_ID1 == read_buf[2]) && (LCM_ID2 == read_buf[3])) ? 1 : 0;
}
Example #4
0
static unsigned int lcm_ata_check(unsigned char *buffer)
{
	unsigned int ret = 0;
	unsigned char read_buf[4];

	send_ctrl_cmd(0x04);
	read_buf[0] = read_data_cmd();	/* dummy read */
	read_buf[1] = read_data_cmd();
	read_buf[2] = read_data_cmd();
	read_buf[3] = read_data_cmd();

	LCM_PRINT("ID = 0x%x, 0x%x, 0x%x\n", read_buf[1], read_buf[2], read_buf[3]);

	if ((read_buf[1] == LCM_ID0) && (read_buf[2] == LCM_ID1) && (read_buf[3] == LCM_ID2))
		ret = 1;
	else
		ret = 0;

	return ret;
}
Example #5
0
static unsigned int lcm_compare_id(void)
{
    unsigned int id = 0;

	send_ctrl_cmd(0x1180);
    id = read_data_cmd();

#if defined(BUILD_UBOOT)
	printf("%s, id1 = 0x%08x\n", __func__, id);
#endif

	send_ctrl_cmd(0x1080);
	id |= (read_data_cmd() << 8);

#if defined(BUILD_UBOOT)
	printf("%s, id2 = 0x%08x\n", __func__, id);
#endif

	return (LCM_ID == id)?1:0;
}
Example #6
0
static unsigned int lcm_esd_check(void)
{
    unsigned int readData;
    unsigned int result = TRUE;

    send_ctrl_cmd(0x0A00);
    readData = read_data_cmd();
    if (readData == 0x009C)
        result = FALSE;

    return result;
}
static unsigned int get_lcd_id_r(unsigned int addr)
{
	unsigned short id = 0;
	
	send_ctrl_cmd(addr);
    id = read_data_cmd();
	//id = (id << 8) | (read_data_cmd() & 0xFF);

	LCD_PRINT("[JINCHI35_HX8357C]get_lcd_id_r: id = 0x%x\n", id);
	
	return id;
}
static unsigned int lcm_compare_id(void)
{
    unsigned int id = 0;

	SET_RESET_PIN(1);
	MDELAY(20);
	SET_RESET_PIN(0);
	MDELAY(20);
	SET_RESET_PIN(1);
	MDELAY(100);
	
	send_ctrl_cmd(0xA100);
	read_data_cmd();
	read_data_cmd();
	read_data_cmd();
	id = read_data_cmd();
	id = (id<<8) | read_data_cmd();

	Lcd_Log("mycat READ OTM8009 LCD ID%s, id = 0x%x,get_lcd_id()=%d \n", __func__, id,get_lcd_id());

	return (LCM_ID == id&&get_lcd_id()==1)?1:0;
	//return (LCM_ID == id)?1:0;
}
Example #9
0
static unsigned int lcm_compare_id(void)
{

	unsigned int id=0;

	send_ctrl_cmd(0xBF);

	read_data_cmd();	//0x01

	read_data_cmd();  // 0x01

	read_data_cmd();	//0x022

	unsigned int param1 = 0;
	param1 =read_data_cmd(); //0x15

	unsigned int param2 =0;
	param2 = read_data_cmd(); //0x26

    	id = ((param1 & LCM_ID_MASK)<<8)|(param2);

    	return (LCM_ID == id)?1:0;
}
static unsigned int lcm_compare_id(void)
{
    unsigned int id=0;
    unsigned int idA1=0,idA2=0,idA3=0,idA4=0,idA5=0;

#ifdef BUILD_LK
		pmic_config_interface(0x0532,5,0x7,5);//add by libo for VGP2 POWER ON
		pmic_config_interface(0x050C,1,0x1,15);
#else
		hwPowerOn(MT6323_POWER_LDO_VGP2,VOL_2800,"LCM");
#endif
		MDELAY(100);
		
    SET_RESET_PIN(1);
    MDELAY(20);
    SET_RESET_PIN(0);
    MDELAY(20);
    SET_RESET_PIN(1);
    MDELAY(100);

    send_ctrl_cmd(0xA100);
    idA1 = read_data_cmd();
    Lcd_Log("mycat READ OTM8012A LCD ID%s, idA1 = 0x%x\n", __func__, idA1);
    idA2 = read_data_cmd();
    Lcd_Log("mycat READ OTM8012A LCD ID%s, idA2 = 0x%x\n", __func__, idA2);
    idA3 = read_data_cmd();
    Lcd_Log("mycat READ OTM8012A LCD ID%s, idA3 = 0x%x\n", __func__, idA3);
    idA4 = read_data_cmd();
    Lcd_Log("mycat READ OTM8012A LCD ID%s, idA4 = 0x%x\n", __func__, idA4);
    idA5 = read_data_cmd();
    Lcd_Log("mycat READ OTM8012A LCD ID%s, idA5 = 0x%x\n", __func__, idA5);
           
    id=((idA4 & 0xff) << 8) | idA5;
    Lcd_Log("mycat READ OTM8012A LCD ID%s, ID = 0x%x\n", __func__, id);
    return (LCM_ID ==id)?1:0;

}
static unsigned int lcm_compare_id(void)
{
    unsigned int id = 0;

#ifdef BUILD_LK
			pmic_config_interface(0x0532,5,0x7,5);//add by libo for VGP2 POWER ON
			pmic_config_interface(0x050C,1,0x1,15);
#else
			hwPowerOn(MT6323_POWER_LDO_VGP2,VOL_2800,"LCM");
#endif
			MDELAY(100);

    SET_RESET_PIN(1);
    MDELAY(20);
    SET_RESET_PIN(0);
    MDELAY(20);
    SET_RESET_PIN(1);
    MDELAY(100);
    send_ctrl_cmd(0xDA00);
    id = read_data_cmd();
		Lcd_Log("MYCAT id1 = 0x%08x\n", id);
    send_ctrl_cmd(0xDB00);
		id = read_data_cmd();
		Lcd_Log("MYCAT id2 = 0x%08x\n", id);
    id= (id<<8);
    send_ctrl_cmd(0xDC00);
    id |= read_data_cmd();


			Lcd_Log("MYCAT id3 = 0x%08x\n", id);



    //return (LCM_ID == id)?1:0;
    	    return (LCM_ID == id&&get_lcd_id()==0)?1:0;

}
Example #12
0
static unsigned int lcm_compare_id(void)
{
    unsigned int id = 0;

    SET_RESET_PIN(1);  //NOTE:should reset LCM firstly
    SET_RESET_PIN(0);
    MDELAY(5);
    SET_RESET_PIN(1);
    MDELAY(20);	

    //*************Enable CMD2 Page1  *******************//
    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);
    MDELAY(10); 

    send_ctrl_cmd(0xC500);
    id = read_data_cmd() << 8;
    id = id | read_data_cmd();

    return (LCM_ID == id)?1:0;
}
static unsigned int lcm_compare_id(void)
{
    unsigned int id = 0;

#ifdef BUILD_LK
		pmic_config_interface(0x0532,5,0x7,5);//add by libo for VGP2 POWER ON
		pmic_config_interface(0x050C,1,0x1,15);
#else
		hwPowerOn(MT6323_POWER_LDO_VGP2,VOL_2800,"LCM");
#endif
		MDELAY(100);
	
	SET_RESET_PIN(1);
	MDELAY(20);
	SET_RESET_PIN(0);
	MDELAY(20);
	SET_RESET_PIN(1);
	MDELAY(100);
	
	send_ctrl_cmd(0xD3);
	read_data_cmd();
	read_data_cmd();
  id = read_data_cmd();

#if defined(BUILD_UBOOT)
	printf("mycat READ LCD ID%s, id = 0x%x\n", __func__, id);
#endif

   id = ((id<<8)&0xff00)+read_data_cmd();
   
#if defined(BUILD_UBOOT)
	printf("mycat READ LCD ID%s, id = 0x%x\n", __func__, id);
#endif
	return (LCM_ID == id)?1:0;
	
}
Example #14
0
static unsigned int get_lcd_id_n(unsigned int addr, unsigned char count)
{
	volatile unsigned int id = 0;
	unsigned char k = 0;
	

	send_ctrl_cmd(addr);

	while (k < count)
	{
		id = read_data_cmd();
		k++;
	}
	LCD_PRINT(LCM_NAME"get_lcd_id_n: id = 0x%x\n", id);
	
    return id;
}
Example #15
0
static unsigned int lcm_compare_id(void)
{
    unsigned int id = 0;
	send_ctrl_cmd(0xBF);
	read_data_cmd();//dummy code:0
	read_data_cmd();//MIPI:0x2
	read_data_cmd();//MIPI:0x4
	id = read_data_cmd();//should 0x94
	id |= read_data_cmd() << 8;//should 0x81
	read_data_cmd();//0xFF
    return (LCM_ID == id)?1:0;
}
Example #16
0
static unsigned int lcm_compare_id(void)
{
	unsigned int id;
         send_ctrl_cmd(0xBF);  // SET password
         read_data_cmd();  //dummy read
	read_data_cmd();	//01
	read_data_cmd();	//62
	id= read_data_cmd(); //83
 	id= ( id<< 8 )  | read_data_cmd();	//57
	read_data_cmd(); //ff
    	return (LCM_ID == id)?1:0;
}
static unsigned int get_lcd_id_n(unsigned int addr, unsigned char count)
{
	volatile unsigned int id = 0;
	unsigned char k = 0;
	

	send_ctrl_cmd(addr);
    UDELAY(10);

	while (k < count)
	{
		id = read_data_cmd();
		k++;
	}
	LCD_PRINT("[JINCHI35_HX8357C]get_lcd_id_n: id = 0x%x\n", id);
	
    return id;
}
Example #18
0
static unsigned int lcm_compare_id(void)
{
	send_ctrl_cmd(0x00);
    return (LCM_ID == read_data_cmd())?1:0;
}