static int init_lcd(struct mipi_dsim_device *dsim)
{
	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
		(unsigned int)SEQ_TEST_KEY_ON_F0,
			ARRAY_SIZE(SEQ_TEST_KEY_ON_F0)) == -1)
		dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_ON_F0 command.\n");
#if 0
	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			(unsigned int)SEQ_TEST_KEY_ON_FC,
				ARRAY_SIZE(SEQ_TEST_KEY_ON_FC)) == -1)
		dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_ON_FC command.\n");
#endif

	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
		0x11, 0);

	msleep(120);

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
		(unsigned int)SEQ_TEST_KEY_OFF_F0,
			ARRAY_SIZE(SEQ_TEST_KEY_OFF_F0)) == -1)
		dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_OFF_F0 command.\n");


	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
		0x35, 0x0);

	return 1;
}
static void init_lcd(struct mipi_dsim_device *dsim)
{

	while (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
		(unsigned int)apply_level_2_key,
			ARRAY_SIZE(apply_level_2_key)) == -1)
		dev_err(dsim->dev, "fail to send apply_level_2_key command.\n");

	usleep_range(16000, 16000);

	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
		0x11, 0);

	usleep_range(16000, 16000);

	while (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			(unsigned int)panel_condition_set,
				ARRAY_SIZE(panel_condition_set)) == -1)
		dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	while (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			(unsigned int)display_condition_set,
				ARRAY_SIZE(display_condition_set)) == -1)
		dev_err(dsim->dev, "fail to send display_condition_set command.\n");

	update_brightness(bd->props.brightness);

	while (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			(unsigned int)etc_set_source_ctrl,
				ARRAY_SIZE(etc_set_source_ctrl)) == -1)
		dev_err(dsim->dev, "fail to send set_source_ctrl command.\n");

	while (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			(unsigned int)etc_set_pentile_ctrl,
				ARRAY_SIZE(etc_set_pentile_ctrl)) == -1)
		dev_err(dsim->dev, "fail to send set_pentile_ctrl command.\n");

	while (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			(unsigned int)etc_set_power_ctrl,
				ARRAY_SIZE(etc_set_power_ctrl)) == -1)
		dev_err(dsim->dev, "fail to send set_power_ctrl command.\n");

	while (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			(unsigned int)elvss_NVM_set,
				ARRAY_SIZE(elvss_NVM_set)) == -1)
		dev_err(dsim->dev, "fail to send elvss_NVM_set command.\n");

	while (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			(unsigned int)elvss_ctrl_set,
				ARRAY_SIZE(elvss_ctrl_set)) == -1)
		dev_err(dsim->dev, "fail to send elvss_ctrl_set command.\n");

	msleep(120);

	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
		0x29, 0);
}
示例#3
0
void dcs_panel_dir(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_1_PARA,
		0xf7, 0x03);
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_1_PARA,
		0xb0, 0x02);
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_1_PARA,
		0xb3, 0xc3);
	/* added */
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_1_PARA,
		0xc0, 0x00);
}
void init_lcd(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
		0, 0);
	mdelay(60);
	/* Exit sleep */
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
		0x11, 0);
	mdelay(600);
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_TURN_ON_PERIPHERAL,
		0, 0);
}
示例#5
0
void dcs_set_gamma(struct mipi_dsim_device *dsim)
{
	unsigned char data_to_send[26] = {
		0xfa, 0x02, 0x18, 0x08, 0x24, 0xe0, 0xd9, 0xd5, 0xc8, 0xcf,
		0xc0, 0xd3, 0xd9, 0xcc, 0xa9, 0xb2, 0x9d, 0xbb, 0xc1, 0xb3,
		0x00, 0x9e, 0x00, 0x9a, 0x00, 0xd3
	};

	s5p_mipi_dsi_wr_data(dsim, DCS_LONG_WR,
		(unsigned int) data_to_send, sizeof(data_to_send));

	s5p_mipi_dsi_wr_data(dsim, DCS_WR_1_PARA,
		0xfa, 0x03);
}
示例#6
0
void dcs_chopping(struct mipi_dsim_device *dsim)
{
	unsigned char data_to_send[4] = {0xf6, 0x01, 0x8c, 0x0b};

	s5p_mipi_dsi_wr_data(dsim, DCS_LONG_WR,
		(unsigned int) data_to_send, sizeof(data_to_send));
}
示例#7
0
static int init_lcd(struct mipi_dsim_device *dsim)
{
    unsigned char   cmd[6], i;

	for (i = 0; i < ARRAY_SIZE(sInitCode); i++) {
	    cmd[0] = sInitCode[i].reg;	        cmd[1] = sInitCode[i].reg  >> 8;
	    cmd[2] = sInitCode[i].data;         cmd[3] = sInitCode[i].data >> 8;
	    cmd[4] = sInitCode[i].data >> 16;   cmd[5] = sInitCode[i].data >> 24;

#if 0
        printk("reg = 0x%04X, data = 0x%08X\n", sInitCode[i].reg, sInitCode[i].data);
        printk("cmd = 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\n", cmd[0]
                                                                  , cmd[1]
                                                                  , cmd[2]
                                                                  , cmd[3]
                                                                  , cmd[4]
                                                                  , cmd[5]);
#endif	    
        if(s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE, 
                                (unsigned int)cmd, sizeof(cmd)) == -1)   return  0;
    	
    	mdelay(10);    
	}
    return  1;
}
static int update_brightness(int brightness)
{
	int backlightlevel;

	backlightlevel = get_backlight_level(brightness);

	while (s5p_mipi_dsi_wr_data(dsim_base, MIPI_DSI_DCS_LONG_WRITE,
			(unsigned int)gamma22_table[backlightlevel],
				GAMMA_PARAM_SIZE) == -1)
		printk(KERN_ERR "fail to write gamma value.\n");

	while (s5p_mipi_dsi_wr_data(dsim_base, MIPI_DSI_DCS_LONG_WRITE,
			(unsigned int)gamma_update,
				ARRAY_SIZE(gamma_update)) == -1)
		printk(KERN_ERR "fail to update gamma value.\n");
	return 1;
}
int ana38401_write(struct lcd_info *lcd, const u8 *seq, u32 len)
{
	int ret = 0;
	int retry;

	if (!lcd->connected)
		return -EINVAL;

	mutex_lock(&lcd->lock);

	retry = 3;
write_data:
	if (!retry) {
		dev_err(&lcd->ld->dev, "%s failed: exceed retry count\n", __func__);
		goto write_err;
	}

	if (len > 2)
		ret = s5p_mipi_dsi_wr_data(lcd->dsim,
					MIPI_DSI_DCS_LONG_WRITE, (u32)seq, len);
	else if (len == 2 && (seq[0] >= 0xB1 && seq[0] <= 0xB9))
		ret = s5p_mipi_dsi_wr_data(lcd->dsim,
					MIPI_DSI_DCS_LONG_WRITE, (u32)seq, len);
	else if (len == 2)
		ret = s5p_mipi_dsi_wr_data(lcd->dsim,
					MIPI_DSI_DCS_SHORT_WRITE_PARAM, seq[0], seq[1]);
	else if (len == 1)
		ret = s5p_mipi_dsi_wr_data(lcd->dsim,
					MIPI_DSI_DCS_SHORT_WRITE, seq[0], 0);
	else {
		ret = -EINVAL;
		goto write_err;
	}

	if (ret != 0) {
		dev_dbg(&lcd->ld->dev, "mipi_write failed retry ..\n");
		retry--;
		goto write_data;
	}

write_err:
	mutex_unlock(&lcd->lock);
	return ret;
}
示例#10
0
void dcs_set_panel_condition(struct mipi_dsim_device *dsim)
{
	unsigned char data_to_send[14] = {
		0xf8, 0x28, 0x28, 0x08, 0x08, 0x40, 0xb0,
		0x50, 0x90, 0x10, 0x30, 0x10, 0x00, 0x00
	};

	s5p_mipi_dsi_wr_data(dsim, DCS_LONG_WR,
		(unsigned int) data_to_send, sizeof(data_to_send));
}
示例#11
0
void dcs_password(struct mipi_dsim_device *dsim)
{
	unsigned char rf[3] = {0x00, 0x5a, 0x5a};

	rf[0] = 0xf0;
	s5p_mipi_dsi_wr_data(dsim, DCS_LONG_WR,
		(unsigned int) rf, 3);

	rf[0] = 0xf1;
	s5p_mipi_dsi_wr_data(dsim, DCS_LONG_WR,
		(unsigned int) rf, 3);

	rf[0] = 0xfc;
	s5p_mipi_dsi_wr_data(dsim, DCS_LONG_WR,
		(unsigned int) rf, 3);

	/* HZ (0x16 = 60Hz) */
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_1_PARA,
		0xfd, 0x14);
}
static int s6e8fa0_write(struct lcd_info *lcd, const u8 *seq, u32 len)
{
	int ret;
	int retry;
	u8 cmd;

	if (!lcd->connected)
		return -EINVAL;

	mutex_lock(&lcd->lock);

	if (len > 2)
		cmd = MIPI_DSI_DCS_LONG_WRITE;
	else if (len == 2)
		cmd = MIPI_DSI_DCS_SHORT_WRITE_PARAM;
	else if (len == 1)
		cmd = MIPI_DSI_DCS_SHORT_WRITE;
	else {
		ret = -EINVAL;
		goto write_err;
	}

	retry = 5;
write_data:
	if (!retry) {
		dev_err(&lcd->ld->dev, "%s failed - exceed retry count\n", __func__);
		goto write_err;
	}
	ret = s5p_mipi_dsi_wr_data(lcd->dsim, cmd, seq, len);
	if (ret != len) {
		dev_dbg(&lcd->ld->dev, "mipi_write failed retry ..\n");
		retry--;
		goto write_data;
	}

write_err:
	mutex_unlock(&lcd->lock);
	return ret;
}
示例#13
0
void dcs_stand_by_off(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_NO_PARA, 0x11, 0);
}
示例#14
0
/* softreset */
void dcs_softreset(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_NO_PARA,
		0x1, 0);
}
示例#15
0
/*
6.19 nop
This command does not have any effect on the display module.
It can be used to terminate a Frame  Memory Write or Read
as described in the descriptions for
write_memory_continue and read_memory_continue.
*/
void dcs_nop(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_NO_PARA,
		0x0, 0);
}
static void init_lcd(struct mipi_dsim_device *dsim)
{
	printk("%s was called\n", __func__);

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			TEST_KEY_ON_1, ARRAY_SIZE(TEST_KEY_ON_1)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			TEST_KEY_ON_2, ARRAY_SIZE(TEST_KEY_ON_2)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			PORCH_ADJUSTMENT, ARRAY_SIZE(PORCH_ADJUSTMENT)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			FRAME_FREQ_SET, ARRAY_SIZE(FRAME_FREQ_SET)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");
	
	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			MEM_ADDR_SET_0, ARRAY_SIZE(MEM_ADDR_SET_0)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");
	
	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			MEM_ADDR_SET_1, ARRAY_SIZE(MEM_ADDR_SET_1)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			LPTS_TIMMING_SET_0, ARRAY_SIZE(LPTS_TIMMING_SET_0)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");
	
	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			LPTS_TIMMING_SET_1, ARRAY_SIZE(LPTS_TIMMING_SET_1)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			SLEEP_OUT, ARRAY_SIZE(SLEEP_OUT)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	usleep_range(120000, 120000);

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			DEFAULT_WHITE_BRIGHTNESS, ARRAY_SIZE(DEFAULT_WHITE_BRIGHTNESS)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			DEFAULT_WHITE_CTRL, ARRAY_SIZE(DEFAULT_WHITE_CTRL)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");
	
	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			ACL_OFF, ARRAY_SIZE(ACL_OFF)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			ELVSS_COND, ARRAY_SIZE(ELVSS_COND)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");
	
	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			SET_POS, ARRAY_SIZE(SET_POS)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			TE_ON, ARRAY_SIZE(TE_ON)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			TEST_KEY_OFF_2, ARRAY_SIZE(TEST_KEY_OFF_2)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");

	if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
			DISPLAY_ON, ARRAY_SIZE(DISPLAY_ON)) == -1)
	dev_err(dsim->dev, "fail to send panel_condition_set command.\n");



}
示例#17
0
/* set pixelformat */
void dcs_set_pixcelformat(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_NO_PARA,
		0x3a, 0);
}
示例#18
0
void dcs_enter_partial(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_NO_PARA,
		0x12, 0);
}
示例#19
0
void dcs_b0(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_1_PARA,
		0xb0, 0x02);
}
示例#20
0
/*
6.2 enter_invert_mode
This command causes the display module to invert the image data
only on the display device.
The frame memory contents remain unchanged.
No status bits are changed.
*/
void dcs_enter_invert(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_NO_PARA,
		0x21, 0);
}
示例#21
0
/*
Function Name : DCS_EnterIdle
Function Description :

6.1 enter_idle_mode
This command causes the display module to enter Idle Mode.
In Idle Mode, color expression is reduced.
Colors are shown on the display device using the MSB of each
of the R, G and B color components in the frame memory.
*/
void dcs_enter_idle(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_NO_PARA,
		0x39, 0);
}
示例#22
0
void dcs_exit_sleep(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_NO_PARA,
		0x11, 0);
	mdelay(600);
}
int init_lcd_mic(struct mipi_dsim_device *dsim)
{
    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)SEQ_TEST_KEY_ON_F0,
                             ARRAY_SIZE(SEQ_TEST_KEY_ON_F0)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_ON_F0 command.\n");

    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)SEQ_TEST_KEY_ON_F1,
                             ARRAY_SIZE(SEQ_TEST_KEY_ON_F1)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_ON_FC command.\n");

    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)SEQ_TEST_KEY_ON_FC,
                             ARRAY_SIZE(SEQ_TEST_KEY_ON_FC)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_ON_FC command.\n");

    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)ED,
                             ARRAY_SIZE(ED)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_TOUCHKEY_OFF command.\n");

    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)FD,
                             ARRAY_SIZE(FD)) == -1)
        dev_err(dsim->dev, "fail to send FD command.\n");

    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE_PARAM,
                         0xF6, 0x08);

    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
                         0x35, 0x0);

    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE_PARAM,
                         0xF9, 0x2B);

    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
                         0x11, 0);

    msleep(120);

    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)EB,
                             ARRAY_SIZE(EB)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_OFF_FC command.\n");

    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)C0,
                             ARRAY_SIZE(C0)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_DISPCTL command.\n");

    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
                         0x29, 0);

    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
                         0x35, 0x0);

    return 1;
}
示例#24
0
void dcs_display_off(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_1_PARA,
		0xfe, 0x00);
}
示例#25
0
void init_lcd(struct mipi_dsim_device *dsim)
{
	unsigned char initcode_013c[6] = {0x3c, 0x01, 0x03, 0x00, 0x02, 0x00};
	unsigned char initcode_0114[6] = {0x14, 0x01, 0x02, 0x00, 0x00, 0x00};
	unsigned char initcode_0164[6] = {0x64, 0x01, 0x05, 0x00, 0x00, 0x00};
	unsigned char initcode_0168[6] = {0x68, 0x01, 0x05, 0x00, 0x00, 0x00};
	unsigned char initcode_016c[6] = {0x6c, 0x01, 0x05, 0x00, 0x00, 0x00};
	unsigned char initcode_0170[6] = {0x70, 0x01, 0x05, 0x00, 0x00, 0x00};
	unsigned char initcode_0134[6] = {0x34, 0x01, 0x1f, 0x00, 0x00, 0x00};
	unsigned char initcode_0210[6] = {0x10, 0x02, 0x1f, 0x00, 0x00, 0x00};
	unsigned char initcode_0104[6] = {0x04, 0x01, 0x01, 0x00, 0x00, 0x00};
	unsigned char initcode_0204[6] = {0x04, 0x02, 0x01, 0x00, 0x00, 0x00};
	unsigned char initcode_0450[6] = {0x50, 0x04, 0x20, 0x01, 0xfa, 0x00};
	unsigned char initcode_0454[6] = {0x54, 0x04, 0x20, 0x00, 0x50, 0x00};
	unsigned char initcode_0458[6] = {0x58, 0x04, 0x00, 0x05, 0x30, 0x00};
	unsigned char initcode_045c[6] = {0x5c, 0x04, 0x05, 0x00, 0x0a, 0x00};
	unsigned char initcode_0460[6] = {0x60, 0x04, 0x20, 0x03, 0x0a, 0x00};
	unsigned char initcode_0464[6] = {0x64, 0x04, 0x01, 0x00, 0x00, 0x00};
	unsigned char initcode_04a0_1[6] = {0xa0, 0x04, 0x06, 0x80, 0x44, 0x00};
	unsigned char initcode_04a0_2[6] = {0xa0, 0x04, 0x06, 0x80, 0x04, 0x00};
	unsigned char initcode_0504[6] = {0x04, 0x05, 0x04, 0x00, 0x00, 0x00};
	unsigned char initcode_049c[6] = {0x9c, 0x04, 0x0d, 0x00, 0x00, 0x00};

	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_013c, sizeof(initcode_013c));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0114, sizeof(initcode_0114));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0164, sizeof(initcode_0164));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0168, sizeof(initcode_0168));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_016c, sizeof(initcode_016c));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0170, sizeof(initcode_0170));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0134, sizeof(initcode_0134));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0210, sizeof(initcode_0210));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0104, sizeof(initcode_0104));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0204, sizeof(initcode_0204));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0450, sizeof(initcode_0450));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0454, sizeof(initcode_0454));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0458, sizeof(initcode_0458));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_045c, sizeof(initcode_045c));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0460, sizeof(initcode_0460));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0464, sizeof(initcode_0464));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_04a0_1, sizeof(initcode_04a0_1));
	mdelay(5);
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_04a0_2, sizeof(initcode_04a0_2));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_0504, sizeof(initcode_0504));
	s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_GENERIC_LONG_WRITE,
		(unsigned int) initcode_049c, sizeof(initcode_049c));

	mdelay(800);
}
示例#26
0
void dcs_display_on(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_NO_PARA, 0x29, 0);
}
static void init_lcd(struct mipi_dsim_device *dsim)
{
    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)SEQ_TEST_KEY_ON_F0,
                             ARRAY_SIZE(SEQ_TEST_KEY_ON_F0)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_ON_F0 command.\n");

    msleep(12);

    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)SEQ_TEST_KEY_ON_F1,
                             ARRAY_SIZE(SEQ_TEST_KEY_ON_F1)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_ON_FC command.\n");

    msleep(12);

    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)SEQ_TEST_KEY_ON_FC,
                             ARRAY_SIZE(SEQ_TEST_KEY_ON_FC)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_ON_FC command.\n");

    msleep(12);

    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)ED,
                             ARRAY_SIZE(ED)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_TOUCHKEY_OFF command.\n");
    msleep(12);
#ifdef CONFIG_FB_I80_COMMAND_MODE
    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)FD,
                             ARRAY_SIZE(FD)) == -1)
        dev_err(dsim->dev, "fail to send FD command.\n");
    msleep(12);

    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE_PARAM,
                         0xF6, 0x08);

    mdelay(12);
#else
    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)E7,
                             ARRAY_SIZE(E7)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_GLOBAL_PARAM_SOURCE_AMP command.\n");

    msleep(120);
#endif
#ifdef CONFIG_DECON_MIC
    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE_PARAM,
                         0xF9, 0x2B);
#endif
    mdelay(20);
    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
                         0x11, 0);

    mdelay(20);
#ifndef CONFIG_FB_I80_COMMAND_MODE
    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
                         0x29, 0);

    mdelay(120);

    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE_PARAM,
                         0xF2, 0x02);

    mdelay(12);
#endif
    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)EB,
                             ARRAY_SIZE(EB)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_TEST_KEY_OFF_FC command.\n");

    mdelay(12);

    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)C0,
                             ARRAY_SIZE(C0)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_DISPCTL command.\n");

    mdelay(12);
#ifdef CONFIG_FB_I80_COMMAND_MODE
    s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_SHORT_WRITE,
                         0x35, 0x0);

    mdelay(12);

#else
    if (s5p_mipi_dsi_wr_data(dsim, MIPI_DSI_DCS_LONG_WRITE,
                             (unsigned int)D29,
                             ARRAY_SIZE(D29)) == -1)
        dev_err(dsim->dev, "fail to send SEQ_DISPCTL command.\n");
#endif
    mdelay(12);

    update_brightness(bd->props.brightness);
}
示例#28
0
void dcs_set_tear_on(struct mipi_dsim_device *dsim)
{
	s5p_mipi_dsi_wr_data(dsim, DCS_WR_NO_PARA, 0x35, 0);
}