summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorAravind Venkateswaran <aravindh@codeaurora.org>2016-08-15 16:13:21 -0700
committerAravind Venkateswaran <aravindh@codeaurora.org>2016-08-15 17:17:31 -0700
commitd8000fe740009753c6e9c17e11dd9cdc77eec7bd (patch)
treea9d7905aa86175f732e88c6281183a4c56024f0e /drivers/video/fbdev
parent2e45ea728118fa88ba245a0a755d0a3844d9f54e (diff)
msm: mdss: update voltage level configuration for CX supply
Read the minimum and the maximum voltage levels for the CX supply from the device tree and use those values to program the CX supply. This allows for flexibility in configuring the levels across multiple targets. CRs-Fixed: 1053687 Change-Id: Ib704bfa6c6ca9fc3d90ab76a2e4aef02dc48822a Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss.h2
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.c26
2 files changed, 24 insertions, 4 deletions
diff --git a/drivers/video/fbdev/msm/mdss.h b/drivers/video/fbdev/msm/mdss.h
index 61e99f47f02f..4724f4378e23 100644
--- a/drivers/video/fbdev/msm/mdss.h
+++ b/drivers/video/fbdev/msm/mdss.h
@@ -277,6 +277,8 @@ struct mdss_data_type {
struct regulator *fs;
struct regulator *venus;
struct regulator *vdd_cx;
+ u32 vdd_cx_min_uv;
+ u32 vdd_cx_max_uv;
bool batfet_required;
struct regulator *batfet;
bool en_svs_high;
diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c
index 518b84fbad51..3662dd6b0693 100644
--- a/drivers/video/fbdev/msm/mdss_mdp.c
+++ b/drivers/video/fbdev/msm/mdss_mdp.c
@@ -1703,6 +1703,24 @@ static int mdss_mdp_irq_clk_setup(struct mdss_data_type *mdata)
pr_debug("unable to get CX reg. rc=%d\n",
PTR_RET(mdata->vdd_cx));
mdata->vdd_cx = NULL;
+ } else {
+ /* Parse CX voltage settings */
+ ret = of_property_read_u32(mdata->pdev->dev.of_node,
+ "vdd-cx-min-uV", &mdata->vdd_cx_min_uv);
+ if (ret) {
+ pr_err("min uV for vdd-cx not specified. rc=%d\n", ret);
+ return ret;
+ }
+
+ ret = of_property_read_u32(mdata->pdev->dev.of_node,
+ "vdd-cx-max-uV", &mdata->vdd_cx_max_uv);
+ if (ret) {
+ pr_err("max uV for vdd-cx not specified. rc=%d\n", ret);
+ return ret;
+ }
+
+ pr_debug("vdd_cx [min_uV, max_uV] = [%d %d]\n",
+ mdata->vdd_cx_min_uv, mdata->vdd_cx_max_uv);
}
mdata->reg_bus_clt = mdss_reg_bus_vote_client_create("mdp\0");
@@ -4744,8 +4762,8 @@ static int mdss_mdp_cx_ctrl(struct mdss_data_type *mdata, int enable)
if (enable) {
rc = regulator_set_voltage(
mdata->vdd_cx,
- RPM_REGULATOR_CORNER_SVS_SOC,
- RPM_REGULATOR_CORNER_SUPER_TURBO);
+ mdata->vdd_cx_min_uv,
+ mdata->vdd_cx_max_uv);
if (rc < 0)
goto vreg_set_voltage_fail;
@@ -4764,8 +4782,8 @@ static int mdss_mdp_cx_ctrl(struct mdss_data_type *mdata, int enable)
}
rc = regulator_set_voltage(
mdata->vdd_cx,
- RPM_REGULATOR_CORNER_NONE,
- RPM_REGULATOR_CORNER_SUPER_TURBO);
+ 0,
+ mdata->vdd_cx_max_uv);
if (rc < 0)
goto vreg_set_voltage_fail;
}