예제 #1
0
int mdss_edp_on(struct mdss_panel_data *pdata)
{
	struct mdss_edp_drv_pdata *edp_drv = NULL;
	int i;

	edp_drv = container_of(pdata, struct mdss_edp_drv_pdata,
			panel_data);
	if (!edp_drv) {
		pr_err("%s: Invalid input data\n", __func__);
		return -EINVAL;
	}

	mdss_edp_prepare_clocks(edp_drv);
	mdss_edp_phy_sw_reset(edp_drv->edp_base);
	mdss_edp_hw_powerup(edp_drv->edp_base, 1);
	mdss_edp_pll_configure(edp_drv->edp_base, edp_drv->edid.timing[0].pclk);
	mdss_edp_clk_enable(edp_drv);

	for (i = 0; i < edp_drv->dpcd.max_lane_count; ++i)
		mdss_edp_enable_lane_bist(edp_drv->edp_base, i, 1);

	mdss_edp_enable_mainlink(edp_drv->edp_base, 1);
	mdss_edp_config_clk(edp_drv->edp_base, edp_drv->mmss_cc_base);

	mdss_edp_phy_misc_cfg(edp_drv->edp_base);
	mdss_edp_config_sync(edp_drv->edp_base);
	mdss_edp_config_sw_div(edp_drv->edp_base);
	mdss_edp_config_static_mdiv(edp_drv->edp_base);
	mdss_edp_enable(edp_drv->edp_base, 1);
	gpio_set_value(edp_drv->gpio_panel_en, 1);

	return 0;
}
예제 #2
0
int mdss_edp_on(struct mdss_panel_data *pdata)
{
	struct mdss_edp_drv_pdata *edp_drv = NULL;
	int ret = 0;

	if (!pdata) {
		pr_err("%s: Invalid input data\n", __func__);
		return -EINVAL;
	}

	edp_drv = container_of(pdata, struct mdss_edp_drv_pdata,
			panel_data);

	pr_debug("%s:+\n", __func__);
	if (edp_drv->train_start == 0)
		edp_drv->train_start++;

	mdss_edp_phy_pll_reset(edp_drv->base);
	mdss_edp_aux_reset(edp_drv->base);
	mdss_edp_mainlink_reset(edp_drv->base);

	ret = mdss_edp_prepare_clocks(edp_drv);
	if (ret)
		return ret;
	mdss_edp_phy_powerup(edp_drv->base, 1);

	mdss_edp_pll_configure(edp_drv->base, edp_drv->edid.timing[0].pclk);
	mdss_edp_phy_pll_ready(edp_drv->base);

	ret = mdss_edp_clk_enable(edp_drv);
	if (ret) {
		mdss_edp_unprepare_clocks(edp_drv);
		return ret;
	}
	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON, false);

	mdss_edp_aux_ctrl(edp_drv->base, 1);

	mdss_edp_lane_power_ctrl(edp_drv->base,
				edp_drv->dpcd.max_lane_count, 1);
	mdss_edp_enable_mainlink(edp_drv->base, 1);
	mdss_edp_config_clk(edp_drv->base, edp_drv->mmss_cc_base);

	mdss_edp_clock_synchrous(edp_drv->base, 1);
	mdss_edp_phy_vm_pe_init(edp_drv->base);
	mdss_edp_config_sync(edp_drv->base);
	mdss_edp_config_sw_div(edp_drv->base);
	mdss_edp_config_static_mdiv(edp_drv->base);
	gpio_set_value(edp_drv->gpio_panel_en, 1);
	mdss_edp_irq_enable(edp_drv);

	pr_debug("%s:-\n", __func__);
	return 0;
}