msm: mdss: add 5v-boost-gpio to dsi panel node

Certain DSI panels need 5v boost gpio to be configured
to work. Add support to define and enable 5v boost gpio as a
panel property. These panels in older targets were relying on
the platform enable gpio to enable the 5v boost on the panel.
This maintains back compatibility for those targets which use
the same panels.

Change-Id: I0410a83044e17648e67a9e8556c5620c75472e62
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
This commit is contained in:
Kuogee Hsieh 2014-09-22 11:11:45 -07:00 committed by David Keitel
parent 97d6f58c1e
commit 053474e9f4
3 changed files with 25 additions and 5 deletions

View file

@ -173,6 +173,7 @@ Optional properties:
- qcom,mdss-dsi-panel-type: Specifies the panel operating mode.
"dsi_video_mode" = enable video mode (default).
"dsi_cmd_mode" = enable command mode.
- qcom,5v-boost-gpio: Specifies the panel gpio for display 5v boost.
- qcom,mdss-dsi-te-check-enable: Boolean to enable Tear Check configuration.
- qcom,mdss-dsi-te-using-te-pin: Boolean to specify whether using hardware vsync.
- qcom,mdss-dsi-te-pin-select: Specifies TE operating mode.
@ -450,6 +451,7 @@ Example:
qcom,mdss-dsi-bl-pmic-bank-select = <0>;
qcom,mdss-dsi-bl-pmic-pwm-frequency = <0>;
qcom,mdss-dsi-pwm-gpio = <&pm8941_mpps 5 0>;
qcom,5v-boost-gpio = <&pm8994_gpios 14 0>;
qcom,mdss-pan-physical-width-dimension = <60>;
qcom,mdss-pan-physical-height-dimension = <140>;
qcom,mdss-dsi-panel-mode-gpio-state = "low";

View file

@ -1729,12 +1729,20 @@ int dsi_panel_device_register(struct device_node *pan_node,
pinfo->panel_max_fps = mdss_panel_get_framerate(pinfo);
pinfo->panel_max_vtotal = mdss_panel_get_vtotal(pinfo);
ctrl_pdata->disp_en_gpio = of_get_named_gpio(ctrl_pdev->dev.of_node,
"qcom,platform-enable-gpio", 0);
if (!gpio_is_valid(ctrl_pdata->disp_en_gpio))
pr_err("%s:%d, Disp_en gpio not specified\n",
__func__, __LINE__);
/*
* If disp_en_gpio has been set previously (disp_en_gpio > 0)
* while parsing the panel node, then do not override it
*/
if (ctrl_pdata->disp_en_gpio <= 0) {
ctrl_pdata->disp_en_gpio = of_get_named_gpio(
ctrl_pdev->dev.of_node,
"qcom,platform-enable-gpio", 0);
if (!gpio_is_valid(ctrl_pdata->disp_en_gpio))
pr_err("%s:%d, Disp_en gpio not specified\n",
__func__, __LINE__);
}
ctrl_pdata->bklt_en_gpio = of_get_named_gpio(ctrl_pdev->dev.of_node,
"qcom,platform-bklight-en-gpio", 0);

View file

@ -1110,6 +1110,16 @@ static int mdss_dsi_parse_panel_features(struct device_node *np,
pinfo->esd_check_enabled = false;
}
if (ctrl->disp_en_gpio <= 0) {
ctrl->disp_en_gpio = of_get_named_gpio(
np,
"qcom,5v-boost-gpio", 0);
if (!gpio_is_valid(ctrl->disp_en_gpio))
pr_err("%s:%d, Disp_en gpio not specified\n",
__func__, __LINE__);
}
return 0;
}