Exemplo n.º 1
0
static void lcm_init(void)
{
    SET_RESET_PIN(0);
    MDELAY(2);
    SET_RESET_PIN(1);
    MDELAY(2);

    init_lcm_registers();
    sw_clear_panel(0x0);              // clean screen as all black
}
Exemplo n.º 2
0
static void lcm_init(void)
{
    SET_RESET_PIN(0);
    MDELAY(25);
    SET_RESET_PIN(1);
    MDELAY(50);

    init_lcm_registers();
    sw_clear_panel(0x0);    // Clean panel as black
}
Exemplo n.º 3
0
static void lcm_init(void)
{
    lcm_util.set_gpio_dir(GPIO138, GPIO_DIR_OUT);
    lcm_util.set_gpio_mode(GPIO138, GPIO_MODE_01);
    //program reset pin
    SET_RESET_PIN(0);
    MDELAY(25);
    SET_RESET_PIN(1);
    MDELAY(50);
}
Exemplo n.º 4
0
static void lcm_init(void)
{
    SET_RESET_PIN(1);
    SET_RESET_PIN(0);
    MDELAY(6);//Must > 5ms
    SET_RESET_PIN(1);
    MDELAY(50);//Must > 50ms

	push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1);
}
static void lcm_suspend(void)
{	
	dsi_set_cmdq_V3(lcm_deep_sleep_mode_in_setting, sizeof(lcm_deep_sleep_mode_in_setting)/sizeof(lcm_deep_sleep_mode_in_setting[0]), 1);
	SET_RESET_PIN(1);	
	SET_RESET_PIN(0);
	MDELAY(20); // 1ms

	SET_RESET_PIN(1);
	MDELAY(120);
}
Exemplo n.º 6
0
static void lcm_suspend(void)
{
    SET_RESET_PIN(1);
    SET_RESET_PIN(0);
    MDELAY(20);//Must > 10ms
    SET_RESET_PIN(1);
    MDELAY(150);//Must > 120ms

	push_table(lcm_deep_sleep_mode_in_setting, sizeof(lcm_deep_sleep_mode_in_setting) / sizeof(struct LCM_setting_table), 1);
}
//static unsigned int lcm_suspended = 0;
static void lcm_suspend(void)
{
		SET_RESET_PIN(1);
    SET_RESET_PIN(0);
    MDELAY(20);
    SET_RESET_PIN(1);
    MDELAY(130);
//	push_table(lcm_deep_sleep_mode_in_setting, sizeof(lcm_deep_sleep_mode_in_setting) / sizeof(struct LCM_setting_table), 1);
//	lcm_suspended = 1;
}
static void lcm_init(void)
{
    SET_RESET_PIN(1);
    SET_RESET_PIN(0);
    MDELAY(5);
    SET_RESET_PIN(1);
    MDELAY(20);

    init_lcm_registers();
}
static unsigned int lcm_compare_id(void)
{

    unsigned int    id = 0;

    //unsigned char data[4];
    
#ifdef BUILD_LK
    unsigned int    lcm_idpin_value = 0;
    lcm_idpin_value = lcm_check_idpin_adc(ADC_CHECK_COUNT);
#endif
    SET_RESET_PIN(1);
    MDELAY(10);
    SET_RESET_PIN(0);
    MDELAY(50);
    SET_RESET_PIN(1);
    MDELAY(120);

    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(0xB3);
    send_data_cmd(0xC3);	
    //for himax8357C
    send_ctrl_cmd(0xFE);
    send_data_cmd(0xD0);
    MDELAY(20);
    id=spi_get_data(0xff);
    //id=spi_get_bytes(0xff,data);
    
#ifdef BUILD_LK
    printf("jmo4861_lcd_id=0x%x \r\n",id);
    //printf("jmo4861_lcd_id data=0x%x,0x%x,0x%x,0x%x \r\n",data[0],data[1],data[2],data[3]);
#else
    printk("jmo4861_lcd_id=0x%x\r\n",id);
#endif

#ifdef BUILD_LK
    if(/*(LCM_ID == id) || */( lcm_idpin_value > 140) && ( lcm_idpin_value <190))//id pin voltage is about 1.5v
#else       
    if(LCM_ID == id)
#endif
    {
        return 1;
    }
    else
    {
        return 0;
    }
    //return (LCM_ID == id)?1:0;

}
Exemplo n.º 10
0
static void lcm_init(void)
{
    SET_RESET_PIN(1);
    SET_RESET_PIN(0);
    MDELAY(10);
    SET_RESET_PIN(1);
    MDELAY(20);//Must over 6 ms,SPEC request

	lcm_init_register();

}
static void lcm_init(void)
{

	SET_RESET_PIN(0);
    MDELAY(200);
    SET_RESET_PIN(1);
    MDELAY(200);  
    push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1);


}
static void lcm_init(void)
{
    SET_RESET_PIN(0);
    MDELAY(25);
    SET_RESET_PIN(1);
    MDELAY(50);

    init_lcm_registers();
	MDELAY(500);
//	clear_panel();
}
Exemplo n.º 13
0
static void lcm_init(void)
{ 
	 //unsigned short id;
	 config_gpio();

	 SET_RESET_PIN(0);
	 MDELAY(25);
	 SET_RESET_PIN(1);
	 MDELAY(120);
	 init_lcm_registers();
}
static void lcm_init(void)
{
    SET_RESET_PIN(1);
    SET_RESET_PIN(0);
    MDELAY(10);
    SET_RESET_PIN(1);
    MDELAY(120);

		dsi_set_cmdq_V3(lcm_initialization_setting,sizeof(lcm_initialization_setting)/sizeof(lcm_initialization_setting[0]),1);

}
Exemplo n.º 15
0
static void lcm_init(void)
{
    lcm_util.set_gpio_dir(GPIO138, GPIO_DIR_OUT);
    lcm_util.set_gpio_mode(GPIO138, GPIO_MODE_01);
    SET_RESET_PIN(0);
    MDELAY(25);
    SET_RESET_PIN(1);
    MDELAY(50);

 //   init_lcm_registers();
}
Exemplo n.º 16
0
static void lcm_suspend(void)
{
    //需先关显示,再reset,否则会干扰psensor等外设
    push_table(lcm_deep_sleep_mode_in_setting, sizeof(lcm_deep_sleep_mode_in_setting) / sizeof(struct LCM_setting_table), 1);
    SET_RESET_PIN(1);
    MDELAY(10);
    SET_RESET_PIN(0);
    MDELAY(10);
    SET_RESET_PIN(1);
    MDELAY(200);
}
static void lcm_suspend(void)
{
	push_table(lcm_deep_sleep_mode_in_setting, sizeof(lcm_deep_sleep_mode_in_setting) / sizeof(struct LCM_setting_table), 1);

	SET_RESET_PIN(1);
	MDELAY(10);
	SET_RESET_PIN(0);
	MDELAY(20);
	upmu_set_rg_vgp2_en(0);
	upmu_set_rg_vgp3_en(0); 
}
static void lcm_suspend(void)
{
    esdSwitch = 0;
    push_table(lcm_deep_sleep_mode_in_setting, sizeof(lcm_deep_sleep_mode_in_setting) / sizeof(struct LCM_setting_table), 1);
    SET_RESET_PIN(1);
    SET_RESET_PIN(0);
    MDELAY(10);
    SET_RESET_PIN(1);
    MDELAY(20);

}
Exemplo n.º 19
0
static void lcm_resume(void)
{

	unsigned int data_array[16];
	#ifdef BUILD_LK
		printf("%s, LK \n", __func__);
	#else
		pr_debug("%s, kernel", __func__);
	#endif
	
#ifdef BUILD_LK
	//printf("[LK/LCM] lcm_resume() enter\n");
	//VGP6 3.3V
	pmic_config_interface(0x424, 0x1, 0x1, 15); 
	pmic_config_interface(0x45a, 0x07, 0x07, 5);
	//vgp4 1.8V
	pmic_config_interface(0x420, 0x1, 0x1, 15); 
	pmic_config_interface(0x43c, 0x03, 0x07, 5);
#else
	hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM");
	hwPowerOn(MT65XX_POWER_LDO_VGP4, VOL_1800, "LCM");
#endif

	mt_set_gpio_mode(GPIO_LCD_RST_EN, GPIO_MODE_00);
	mt_set_gpio_dir(GPIO_LCD_RST_EN, GPIO_DIR_OUT);
	mt_set_gpio_out(GPIO_LCD_RST_EN, GPIO_OUT_ONE);
	MDELAY(20);
		
	mt_set_gpio_mode(GPIO_LCD_STB_EN, GPIO_MODE_00);
	mt_set_gpio_dir(GPIO_LCD_STB_EN, GPIO_DIR_OUT);
	mt_set_gpio_out(GPIO_LCD_STB_EN, GPIO_OUT_ONE);
	MDELAY(20);
//#endif

	//unsigned int data_array[16];
	//lcm_init();
	MDELAY(50); 
	
	SET_RESET_PIN(1);
	SET_RESET_PIN(0);
	MDELAY(1);
	SET_RESET_PIN(1);


	init_lcm_registers();

	data_array[0] = 0x00101500; // Sleep Out
	dsi_set_cmdq(data_array, 1, 1);
	MDELAY(20);

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

}
static void lcd_reset(unsigned char enabled)
{
	if (enabled > 0)
	{
		SET_RESET_PIN(1);    
	}
	else
	{	
		SET_RESET_PIN(0);    
	}
}
Exemplo n.º 21
0
static void lcm_init(void)
{
    config_gpio();

    SET_RESET_PIN(0);
    MDELAY(20);
    SET_RESET_PIN(1);
    MDELAY(50);

    init_lcm_registers();
}
Exemplo n.º 22
0
static void lcm_init(void)
{
	SET_RESET_PIN(1);
	MDELAY(5);
    SET_RESET_PIN(0);
    MDELAY(50);  
    SET_RESET_PIN(1);
    MDELAY(120);

    init_lcm_registers();
	lcm_update_black(0, 0, FRAME_WIDTH, FRAME_HEIGHT, 0x00);
}
static void lcm_resume(void)
{
 
 
    SET_RESET_PIN(1);
    MDELAY(1);    
    SET_RESET_PIN(0);
    MDELAY(10);
    SET_RESET_PIN(1);
    MDELAY(20); 
    lcm_initialization_setting();
}
static void lcm_init(void)
{
	
	SET_RESET_PIN(1);
	SET_RESET_PIN(0);
	MDELAY(10);
	SET_RESET_PIN(1);
	MDELAY(120);
	dsi_set_cmdq_V3(lcm_initialization_setting,sizeof(lcm_initialization_setting)/sizeof(lcm_initialization_setting[0]),1);

	//push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1);
}
static void lcm_init(void)
{
	SET_RESET_PIN(1);
	MDELAY(200);
	SET_RESET_PIN(0);
	MDELAY(500);
	SET_RESET_PIN(1);
	MDELAY(500);
//sw_clear_panel(0X00);
	init_lcm_registers();
  sw_clear_panel(0x00);
}
Exemplo n.º 26
0
static void lcm_suspend(void)
{
	LCM_DBG("lcm_suspend");


	push_table(lcm_sleep_in_setting, sizeof(lcm_sleep_in_setting) / sizeof(struct LCM_setting_table), 1);
    SET_RESET_PIN(1);
	SET_RESET_PIN(0);	
	MDELAY(10);	
	SET_RESET_PIN(1);
    MDELAY(120);	
}
static void lcm_suspend(void)
{
#ifndef BUILD_LK
	SET_RESET_PIN(1);  //NOTE:should reset LCM firstly
	MDELAY(10);
	SET_RESET_PIN(0);
	MDELAY(30);
	SET_RESET_PIN(1);
	MDELAY(120);
//	push_table(lcm_deep_sleep_mode_in_setting, sizeof(lcm_deep_sleep_mode_in_setting) / sizeof(struct LCM_setting_table), 1);	//wqtao. enable
#endif
}
Exemplo n.º 28
0
static void lcm_init(void)
{
	backup_io_mode();

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

	init_lcm_registers();
}
Exemplo n.º 29
0
static void lcm_init(void)
{

	#ifdef BUILD_LK
		printf("%s, LK \n", __func__);
	#else
		pr_debug("%s, kernel", __func__);
	#endif
	
	#ifdef BUILD_LK
		//printf("[LK/LCM] lcm_init() enter\n");
	//VGP6 3.3V
	pmic_config_interface(0x424, 0x1, 0x1, 15); 
	pmic_config_interface(0x45a, 0x07, 0x07, 5);
	//vgp4 1.8V
	pmic_config_interface(0x420, 0x1, 0x1, 15); 
	pmic_config_interface(0x43c, 0x03, 0x07, 5);
	
	mt_set_gpio_mode(GPIO_LCD_RST_EN, GPIO_MODE_00);
	mt_set_gpio_dir(GPIO_LCD_RST_EN, GPIO_DIR_OUT);
	mt_set_gpio_out(GPIO_LCD_RST_EN, GPIO_OUT_ONE);
	MDELAY(20);
	
	mt_set_gpio_mode(GPIO_LCD_STB_EN, GPIO_MODE_00);
	mt_set_gpio_dir(GPIO_LCD_STB_EN, GPIO_DIR_OUT);
	mt_set_gpio_out(GPIO_LCD_STB_EN, GPIO_OUT_ONE);
	MDELAY(20);

	/*MDELAY(50); 
	
	SET_RESET_PIN(1);
	SET_RESET_PIN(0);
	MDELAY(1);
	SET_RESET_PIN(1);


	init_lcm_registers();*/
	#else
	
	hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM");
	hwPowerOn(MT65XX_POWER_LDO_VGP4, VOL_1800, "LCM");
	#endif 

	MDELAY(50); 
	
	SET_RESET_PIN(1);
	SET_RESET_PIN(0);
	MDELAY(1);
	SET_RESET_PIN(1);


	init_lcm_registers();
}
Exemplo n.º 30
0
static void lcm_suspend(void)
{
           unsigned int data_array[16];	   

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