diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-08-16 16:35:10 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-16 16:35:10 -0700 |
| commit | cca095ddea6115ac8ffd35893bf85c9c6fc55b61 (patch) | |
| tree | 921d0c2020ba90656e08f1a38a3cb29b3b082269 | |
| parent | 0391265ec07bbd6b2854e8bf1004b803c1359ff9 (diff) | |
| parent | d8000fe740009753c6e9c17e11dd9cdc77eec7bd (diff) | |
Merge "msm: mdss: update voltage level configuration for CX supply"
| -rw-r--r-- | Documentation/devicetree/bindings/fb/mdss-mdp.txt | 6 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss.h | 2 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp.c | 26 |
3 files changed, 30 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/fb/mdss-mdp.txt b/Documentation/devicetree/bindings/fb/mdss-mdp.txt index 93cacc07e623..c8cf395d5669 100644 --- a/Documentation/devicetree/bindings/fb/mdss-mdp.txt +++ b/Documentation/devicetree/bindings/fb/mdss-mdp.txt @@ -243,6 +243,12 @@ Bus Scaling Data: Optional properties: - batfet-supply : Phandle for battery FET regulator device node. - vdd-cx-supply : Phandle for vdd CX regulator device node. +- vdd-cx-min-uV : The minimum voltage level in uV for the CX rail + whenever the display is on. If vdd-cx-supply is + specified, then this binding is mandatory. +- vdd-cx-max-uV : The maximum voltage level in uV for the CX rail + whenever the display is on. If vdd-cx-supply is + specified, then this binding is mandatory. - qcom,vbif-settings : Array with key-value pairs of constant VBIF register settings used to setup MDSS QoS for optimum performance. The key used should be offset from "vbif_phys" register 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 73af16ca6ed4..a9571a4b8d15 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"); @@ -4743,8 +4761,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; @@ -4763,8 +4781,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; } |
