예제 #1
0
void
xtl_lcd_hd44780_strobe(void)
{
  lcd_enable(1);
  lcd_delay_us(1);
  lcd_enable(0);
  lcd_delay_us(1);
}
예제 #2
0
static int tm070rdh11_set_power(struct lcd_panel *panel, int on)
{
	struct lcd_platform_data *pdata = &(panel->dev);

	printf("%s : %d ~ \n", __func__, on);

	if (on) {
		tcclcd_gpio_set_value(pdata->reset, 1);
		lcd_delay_us(1000);

		tcclcd_gpio_set_value(pdata->power_on, 1);
		lcd_delay_us(1000);
		tcclcd_gpio_set_value(pdata->reset, 0);
		lcd_delay_us(1000);
		tcclcd_gpio_set_value(pdata->reset, 1);

		mdelay(10);

		lcdc_initialize(pdata->lcdc_num, panel);

		LCDC_IO_Set(pdata->lcdc_num, panel->bus_width);

		// lcd port current 
		BITCSET(HwGPIOC->GPCD0,0xFFFFFFFF, 0xAAAAAAAA);		
		BITCSET(HwGPIOC->GPCD1,0x00FFFFFF, 0x00FFAAAA);

		BITCSET(HwGPIOC->GPFN3, HwPORTCFG_GPFN0_MASK , HwPORTCFG_GPFN0(0));
		BITCSET(HwGPIOC->GPEN, Hw24 ,Hw24);
		BITCSET(HwGPIOC->GPDAT, Hw24 ,0);

		mdelay(16);

	}
	else 
	{
		tcclcd_gpio_set_value(pdata->display_on, 0);
		mdelay(10);
		tcclcd_gpio_set_value(pdata->reset, 0);
		tcclcd_gpio_set_value(pdata->power_on, 0);
		LCDC_IO_Disable(pdata->lcdc_num, panel->bus_width);
	}

	return 0;
}
예제 #3
0
static int hm8369_set_power(struct lcd_panel *panel, int on)
{
    struct lcd_platform_data *pdata = &(panel->dev);

    dprintf(0,"hm8369_set_power, on=%d\n", on);


    if (on) {
        tcclcd_gpio_set_value(pdata->reset, 1);
#if defined(_M801_88_)
        lcd_delay_us(1000*10);
#else
        lcd_delay_us(1000);
#endif
        tcclcd_gpio_set_value(pdata->power_on, 1);
        lcd_delay_us(1000);
        tcclcd_gpio_set_value(pdata->reset, 0);
        lcd_delay_us(1000);
        tcclcd_gpio_set_value(pdata->reset, 1);

        tcclcd_gpio_set_value(pdata->display_on, 1);
        mdelay(10);

        lcdc_initialize(pdata->lcdc_num, panel);

        LCDC_IO_Set(pdata->lcdc_num, panel->bus_width);

        LCDC_IO_SetCurrent(pdata->lcdc_num, panel->bus_width);

        mdelay(16);
    }
    else
    {
        tcclcd_gpio_set_value(pdata->display_on, 0);
        mdelay(10);
        tcclcd_gpio_set_value(pdata->reset, 0);
        tcclcd_gpio_set_value(pdata->power_on, 0);
        LCDC_IO_Disable(pdata->lcdc_num, panel->bus_width);
    }
    return 0;
}
예제 #4
0
static int hv070wsa_set_power(struct lcd_panel *panel, int on)
{
	unsigned int P, M, S, VSEL;
	#if defined(TCC88XX) || defined(TCC892X)
	PDDICONFIG		pDDICfg 	= (DDICONFIG *)HwDDI_CONFIG_BASE;
	#else
	PDDICONFIG		pDDICfg 	= (DDICONFIG *)&HwDDI_CONFIG_BASE;
	#endif//
	
	struct lcd_platform_data *pdata = &(panel->dev);
	printf("%s : onoff:%d lcdc_num\n", __func__, on, pdata->lcdc_num);

	if (on) {
		tcclcd_gpio_set_value(pdata->power_on, 1);
		lcd_delay_us(20);

		tcclcd_gpio_set_value(pdata->reset, 1);
		tcclcd_gpio_set_value(pdata->display_on, 1);
	
		lcdc_initialize(pdata->lcdc_num, panel);

		
	#if defined(TCC892X)

		// LVDS reset	
		pDDICfg->LVDS_CTRL.bREG.RST =1;
		pDDICfg->LVDS_CTRL.bREG.RST =0;		
		#if 0
		BITCSET(pDDICfg->LVDS_TXO_SEL0.nREG, 0xFFFFFFFF, 0x15141312);
		BITCSET(pDDICfg->LVDS_TXO_SEL1.nREG, 0xFFFFFFFF, 0x0B0A1716);
		BITCSET(pDDICfg->LVDS_TXO_SEL2.nREG, 0xFFFFFFFF, 0x0F0E0D0C);
		BITCSET(pDDICfg->LVDS_TXO_SEL3.nREG, 0xFFFFFFFF, 0x05040302);
		BITCSET(pDDICfg->LVDS_TXO_SEL4.nREG, 0xFFFFFFFF, 0x1A190706);
		BITCSET(pDDICfg->LVDS_TXO_SEL5.nREG, 0xFFFFFFFF, 0x1F1E1F18);
		BITCSET(pDDICfg->LVDS_TXO_SEL6.nREG, 0xFFFFFFFF, 0x1F1E1F1E);
		BITCSET(pDDICfg->LVDS_TXO_SEL7.nREG, 0xFFFFFFFF, 0x1F1E1F1E);
		BITCSET(pDDICfg->LVDS_TXO_SEL8.nREG, 0xFFFFFFFF, 0x001E1F1E);
		#else
		BITCSET(pDDICfg->LVDS_TXO_SEL0.nREG, 0xFFFFFFFF, 0x13121110);
		BITCSET(pDDICfg->LVDS_TXO_SEL1.nREG, 0xFFFFFFFF, 0x09081514);
		BITCSET(pDDICfg->LVDS_TXO_SEL2.nREG, 0xFFFFFFFF, 0x0D0C0B0A);
		BITCSET(pDDICfg->LVDS_TXO_SEL3.nREG, 0xFFFFFFFF, 0x03020100);
		
		BITCSET(pDDICfg->LVDS_TXO_SEL4.nREG, 0xFFFFFFFF, 0x1A190504);
		BITCSET(pDDICfg->LVDS_TXO_SEL5.nREG, 0xFFFFFFFF, 0x0E171618);
		BITCSET(pDDICfg->LVDS_TXO_SEL6.nREG, 0xFFFFFFFF, 0x1F07060F);
		BITCSET(pDDICfg->LVDS_TXO_SEL7.nREG, 0xFFFFFFFF, 0x1F1E1F1E);
		BITCSET(pDDICfg->LVDS_TXO_SEL8.nREG, 0xFFFFFFFF, 0x001E1F1E);
		#endif//
		M = 10; P = 10; S = 0; VSEL = 0;		
		BITCSET(pDDICfg->LVDS_CTRL.nREG, 0x00FFFFF0, (VSEL<<4)|(S<<5)|(M<<8)|(P<<15)); //LCDC1

		// LVDS Select LCDC 1
		if(pdata->lcdc_num ==1)
		BITCSET(pDDICfg->LVDS_CTRL.nREG, 0x3 << 30 , 0x1 << 30);
		else
			BITCSET(pDDICfg->LVDS_CTRL.nREG, 0x3 << 30 , 0x0 << 30);

	    	pDDICfg->LVDS_CTRL.bREG.RST = 1;	//  reset
	    		
	    	// LVDS enable
	  	pDDICfg->LVDS_CTRL.bREG.EN = 1;   // enable
	  	
	#else	
		// LVDS power on
		tca_ckc_setpmupwroff(PMU_LVDSPHY, ENABLE);

	    // LVDS reset
	    BITSET(pDDICfg->LVDS_CTRL, Hw1);    // reset
	    BITCLR(pDDICfg->LVDS_CTRL, Hw1);    // normal

		pDDICfg->LVDS_TXO_SEL0 = 0x15141312; // SEL_03, SEL_02, SEL_01, SEL_00,
		pDDICfg->LVDS_TXO_SEL1 = 0x0B0A1716; // SEL_07, SEL_06, SEL_05, SEL_04,
		pDDICfg->LVDS_TXO_SEL2 = 0x0F0E0D0C; // SEL_11, SEL_10, SEL_09, SEL_08,
		pDDICfg->LVDS_TXO_SEL3 = 0x05040302; // SEL_15, SEL_14, SEL_13, SEL_12,
		pDDICfg->LVDS_TXO_SEL4 = 0x1A190706; // SEL_19, SEL_18, SEL_17, SEL_16,
		pDDICfg->LVDS_TXO_SEL5 = 0x1F1E1F18; //                         SEL_20,
		pDDICfg->LVDS_TXO_SEL6 = 0x1F1E1F1E;
		pDDICfg->LVDS_TXO_SEL7 = 0x1F1E1F1E;
		pDDICfg->LVDS_TXO_SEL8 = 0x1F1E1F1E;
		
		// LVDS Select
	//	BITCLR(pDDICfg->LVDS_CTRL, Hw0); //LCDC0
		BITSET(pDDICfg->LVDS_CTRL, Hw0); //LCDC1

		#ifdef TCC88XX
		M = 10; P = 10; S = 0; VSEL = 0;
		
		BITCSET(pDDICfg->LVDS_CTRL, Hw21- Hw4, (VSEL<<4)|(S<<5)|(M<<8)|(P<<15)); //LCDC1

		BITSET(pDDICfg->LVDS_CTRL, Hw1);    // reset
		#endif//
		
	    	// LVDS enable
	  	 BITSET(pDDICfg->LVDS_CTRL, Hw2);    // enable
	#endif
	
	}
	else 	{
		tcclcd_gpio_set_value(pdata->power_on, 0);
	}
	return 0;
}
예제 #5
0
static void 
lcd_delay_ms(	UINT32 x)
{
	lcd_delay_us(x * 1000);
}