Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70b4df67 authored by Kuogee Hsieh's avatar Kuogee Hsieh
Browse files

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: default avatarKuogee Hsieh <khsieh@codeaurora.org>
parent a3931eb3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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";
+13 −5
Original line number Diff line number Diff line
@@ -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,

	/*
	 * 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);
+10 −0
Original line number Diff line number Diff line
@@ -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;
}