From 8692a7d6784228c55a876e659912bcffb81fb3fb Mon Sep 17 00:00:00 2001 From: David Collins Date: Mon, 19 Sep 2016 10:53:10 -0700 Subject: [PATCH] regulator: cpr3-mmss-regulator: update reference voltages for msmcobalt v2 MSMCOBALT v2 parts with CPR fusing revision 1 and above will have their open-loop voltage fuses blown assuming new lower reference voltages. These lower reference values allow for fusing parts with lower open-loop voltages than was possible before. Update the driver in order to use a different set of open-loop fuse reference voltages for MSMCOBALT v2 CPR revision 0 vs revisions 1 to 7. Change-Id: I8539ca3a3456b9562e7ff0e48fd7824c15cea68f CRs-Fixed: 1068464 Signed-off-by: David Collins --- drivers/regulator/cpr3-mmss-regulator.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/cpr3-mmss-regulator.c b/drivers/regulator/cpr3-mmss-regulator.c index b0439871c41a..59cbe7460750 100644 --- a/drivers/regulator/cpr3-mmss-regulator.c +++ b/drivers/regulator/cpr3-mmss-regulator.c @@ -217,6 +217,14 @@ msmcobalt_v1_rev0_mmss_fuse_ref_volt[MSM8996_MMSS_FUSE_CORNERS] = { }; static const int msmcobalt_v2_mmss_fuse_ref_volt[MSM8996_MMSS_FUSE_CORNERS] = { + 516000, + 628000, + 752000, + 924000, +}; + +static const int +msmcobalt_v2_rev0_mmss_fuse_ref_volt[MSM8996_MMSS_FUSE_CORNERS] = { 616000, 740000, 828000, @@ -759,7 +767,10 @@ static int cpr3_msm8996_mmss_calculate_open_loop_voltages( goto done; } - if (vreg->thread->ctrl->soc_revision == MSMCOBALT_V2_SOC_ID) + if (vreg->thread->ctrl->soc_revision == MSMCOBALT_V2_SOC_ID + && fuse->cpr_fusing_rev == 0) + ref_volt = msmcobalt_v2_rev0_mmss_fuse_ref_volt; + else if (vreg->thread->ctrl->soc_revision == MSMCOBALT_V2_SOC_ID) ref_volt = msmcobalt_v2_mmss_fuse_ref_volt; else if (vreg->thread->ctrl->soc_revision == MSMCOBALT_V1_SOC_ID && fuse->cpr_fusing_rev == 0)