Ejemplo n.º 1
0
static int mipi_novatek_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	struct mipi_panel_info *mipi;
	struct msm_panel_info *pinfo;

	mfd = platform_get_drvdata(pdev);
	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;

	pinfo = &mfd->panel_info;
	if (pinfo->is_3d_panel)
		support_3d = TRUE;

	mipi  = &mfd->panel_info.mipi;

	if (mipi->mode == DSI_VIDEO_MODE) {
		mipi_dsi_cmds_tx(mfd, &novatek_tx_buf, novatek_video_on_cmds,
			ARRAY_SIZE(novatek_video_on_cmds));
	} else {
		mipi_dsi_cmds_tx(mfd, &novatek_tx_buf, novatek_cmd_on_cmds,
			ARRAY_SIZE(novatek_cmd_on_cmds));

		mipi_novatek_manufacture_id(mfd);
	}

	return 0;
}
Ejemplo n.º 2
0
struct fbcon_config *mipi_init(void)
{
	int status = 0;
	struct mipi_dsi_panel_config *panel_info = get_panel_info();
	/* Enable MMSS_AHB_ARB_MATER_PORT_E for arbiter master0 and master 1 request */
#if (!DISPLAY_MIPI_PANEL_RENESAS)
	writel(0x00001800, MMSS_SFPB_GPREG);
#endif

#if DISPLAY_MIPI_PANEL_TOSHIBA_MDT61
	mipi_dsi_phy_init(panel_info);
#else
	mipi_dsi_phy_ctrl_config(panel_info);
#endif

	status += mipi_dsi_panel_initialize(panel_info);

#if DISPLAY_MIPI_PANEL_NOVATEK_BLUE
	mipi_dsi_cmd_bta_sw_trigger();
	mipi_novatek_manufacture_id();
#endif
	mipi_fb_cfg.base = MIPI_FB_ADDR;

	if (panel_info->mode == MIPI_VIDEO_MODE)
		status += mipi_dsi_video_config(panel_info->num_of_lanes);

	if (panel_info->mode == MIPI_CMD_MODE)
		cmd_mode_status = 1;

	return &mipi_fb_cfg;
}
Ejemplo n.º 3
0
static int mipi_novatek_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	struct msm_fb_panel_data *pdata = NULL;
	struct msm_panel_info *pinfo;

	mfd = platform_get_drvdata(pdev);
	if (!mfd)
		return -ENODEV;
	pdata = (struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;

	if (mfd->key != MFD_KEY)
		return -EINVAL;

	pinfo = &mfd->panel_info;
	if (pinfo->is_3d_panel)
		support_3d = TRUE;

	if (mfd->init_mipi_lcd == 0) {
		PR_DISP_DEBUG("Display On - 1st time\n");

		if (pdata && pdata->panel_type_detect)
			pdata->panel_type_detect(&pinfo->mipi);

		mfd->init_mipi_lcd = 1;

	} else {
		PR_DISP_DEBUG("Display On \n");

		if (panel_type != PANEL_ID_NONE) {
			PR_DISP_INFO("%s\n", ptype);

			htc_mdp_sem_down(current, &mfd->dma->mutex);
			mipi_dsi_cmds_tx(&novatek_tx_buf, mipi_power_on_cmd,
				mipi_power_on_cmd_size);
			htc_mdp_sem_up(&mfd->dma->mutex);
#if 0 /* mipi read command verify */
				/* clean up ack_err_status */
				mipi_dsi_cmd_bta_sw_trigger();
				mipi_novatek_manufacture_id(mfd);
#endif
		} else {
			printk(KERN_ERR "panel_type=0x%x not support at power on\n", panel_type);
			return -EINVAL;
		}
	}
	PR_DISP_DEBUG("Init done!\n");

	return 0;
}
Ejemplo n.º 4
0
// -----------------------------------------------------------------------------
//                         Common Routine Implementation
// -----------------------------------------------------------------------------
static int mipi_orise_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	struct msm_fb_panel_data *pdata = NULL;
	struct mipi_panel_info *mipi;
	static int init = 0;

	mfd = platform_get_drvdata(pdev);
	pdata = (struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;

	mipi  = &mfd->panel_info.mipi;
	mutex_lock(&cmdlock);
	if (init == 0) {
		if(pdata && pdata->panel_type_detect)
			pdata->panel_type_detect();
		init = 1;
		goto end;
	} else {
		if (mipi->mode == DSI_VIDEO_MODE) {
			mipi_dsi_cmds_tx(&orise_tx_buf, orise_video_on_cmds,
				ARRAY_SIZE(orise_video_on_cmds));
		} else {
			if(panel_type != PANEL_ID_NONE) {
				pr_info("%s\n", ptype);
				mipi_dsi_cmds_tx(&orise_tx_buf, mipi_power_on_cmd, mipi_power_on_cmd_size);
				#ifdef MIPI_READ_DISPLAY_ID /* mipi read command verify */
				/* clean up ack_err_status */
				mipi_dsi_cmd_bta_sw_trigger();
				mipi_novatek_manufacture_id();
				#endif
			}
			else {
				printk(KERN_ERR "panel_type=0x%x not support at power on\n", panel_type);
				mutex_unlock(&cmdlock);
				return -EINVAL;
			}
		}
	}
end:
	mutex_unlock(&cmdlock);
	return 0;
}
Ejemplo n.º 5
0
static void panel_manu_id_detection(uint32_t* manu_id, uint32_t* manu_id0)
{
	mdss_dsi_cmd_bta_sw_trigger(MIPI_DSI_BASE);
	*manu_id = mipi_novatek_manufacture_id();
	*manu_id0 = mipi_novatek_manufacture_id0();
}