public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V1] regulator: da9053/52: Fix incorrectly stated minimum and maximum voltage limits
@ 2016-07-20 14:53 Steve Twiss
  2016-07-20 16:43 ` Applied "regulator: da9053/52: Fix incorrectly stated minimum and maximum voltage limits" to the regulator tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Twiss @ 2016-07-20 14:53 UTC (permalink / raw)
  To: LINUXKERNEL, Liam Girdwood, Mark Brown; +Cc: Support Opensource

From: Steve Twiss <stwiss.opensource@diasemi.com>

This fix alters the minimum and maximum BUCK voltage limits for DA9052 and
DA9053. It does so for the following cases:

DA9052
- BUCK3 (MEM)
   min: 0.925V -> 0.950V
   max: 2.500V -> 2.525V

DA9053
- BUCK3 (MEM)
   min: 0.925V -> 0.950V
   max: 2.500V -> 2.525V
- BUCK4 (PERI)
   min: 0.925V -> 0.950V
   max: 2.500V -> 2.525V

The voltage range remains the same, but the limits are shifted by +0.025V.

This change is provided on DA9052:MEM, DA9053:MEM and DA9053:PERI
and is a voltage difference of 0.025V, compared to those measured before
this fix is applied. The patch has the effect of decreasing *all* measured
voltages on those BUCKs when compared against the previously measured
values for the same software voltage request.

For example, with this fix applied for DA9052:MEM, DA9053:MEM and
DA9053:PERI, the following is true.

Because the previous software defined slot 0 as being 0.925V, if a request
for 0.950V was previously sent, the slot 1 voltage would have been used.
This would have corresponded to an actual measured voltage of 0.975V. But,
with this patch fix, and with slot 0 properly aligned to 0.950V, if a
voltage of 0.950V is requested by software, a measured value of 0.950V will
be provided.

Tested-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>

---
This patch applies against linux-next and v4.7-rc7

Hi Mark,

The advice for this patch is NOT to push these changes backwards into older
Linux stable kernels.

Although I have tested the patches for the current kernel linux-next/v4.7-rc7
and for the stable releases: v4.6.4, v4.5.7, v4.4.15 and v4.1.28; I have
NOT requested any Cc: <stable@vger.kernel.org> in this case.

The patch change will have the effect of decreasing *all* measured voltages
provided on DA9052:MEM, DA9053:MEM and DA9053:PERI by 0.025V compared to
those measured before the fix is applied.

Even though the new voltage measurement value will be correct, a small
decrease in the expected voltage could theoretically cause problems for
any system closely tuned to expect the previous voltage measure. This is
despite the voltage difference being only 0.025V (which at 1V will be below
the 3% tolerance limit of the BUCKs and LDOs). However, there could still be
a risk for existing systems that have been tuned exceptionally tightly,
even if this is a highly unlikely scenario.

That is the unknown here, and the basis for the recommendation. Even though
the risk is estimated to be very low in this case, because it is a
perceived risk to existing systems the patch should not be back-ported into
the linux-stable kernel trees.

Regards,
Steve


 drivers/regulator/da9052-regulator.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index 1050cb7..9ececfe 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -333,7 +333,7 @@ static const struct regulator_ops da9052_ldo_ops = {
 static struct da9052_regulator_info da9052_regulator_info[] = {
 	DA9052_DCDC(BUCK1, 25, 500, 2075, 6, 6, DA9052_SUPPLY_VBCOREGO),
 	DA9052_DCDC(BUCK2, 25, 500, 2075, 6, 6, DA9052_SUPPLY_VBPROGO),
-	DA9052_DCDC(BUCK3, 25, 925, 2500, 6, 6, DA9052_SUPPLY_VBMEMGO),
+	DA9052_DCDC(BUCK3, 25, 950, 2525, 6, 6, DA9052_SUPPLY_VBMEMGO),
 	DA9052_DCDC(BUCK4, 50, 1800, 3600, 5, 6, 0),
 	DA9052_LDO(LDO1, 50, 600, 1800, 5, 6, 0),
 	DA9052_LDO(LDO2, 25, 600, 1800, 6, 6, DA9052_SUPPLY_VLDO2GO),
@@ -350,8 +350,8 @@ static struct da9052_regulator_info da9052_regulator_info[] = {
 static struct da9052_regulator_info da9053_regulator_info[] = {
 	DA9052_DCDC(BUCK1, 25, 500, 2075, 6, 6, DA9052_SUPPLY_VBCOREGO),
 	DA9052_DCDC(BUCK2, 25, 500, 2075, 6, 6, DA9052_SUPPLY_VBPROGO),
-	DA9052_DCDC(BUCK3, 25, 925, 2500, 6, 6, DA9052_SUPPLY_VBMEMGO),
-	DA9052_DCDC(BUCK4, 25, 925, 2500, 6, 6, 0),
+	DA9052_DCDC(BUCK3, 25, 950, 2525, 6, 6, DA9052_SUPPLY_VBMEMGO),
+	DA9052_DCDC(BUCK4, 25, 950, 2525, 6, 6, 0),
 	DA9052_LDO(LDO1, 50, 600, 1800, 5, 6, 0),
 	DA9052_LDO(LDO2, 25, 600, 1800, 6, 6, DA9052_SUPPLY_VLDO2GO),
 	DA9052_LDO(LDO3, 25, 1725, 3300, 6, 6, DA9052_SUPPLY_VLDO3GO),
-- 
end-of-patch for PATCH V1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Applied "regulator: da9053/52: Fix incorrectly stated minimum and maximum voltage limits" to the regulator tree
  2016-07-20 14:53 [PATCH V1] regulator: da9053/52: Fix incorrectly stated minimum and maximum voltage limits Steve Twiss
@ 2016-07-20 16:43 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2016-07-20 16:43 UTC (permalink / raw)
  To: Steve Twiss
  Cc: Mark Brown, LINUXKERNEL, Liam Girdwood, Mark Brown,
	Support Opensource

The patch

   regulator: da9053/52: Fix incorrectly stated minimum and maximum voltage limits

has been applied to the regulator tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 707319b60ade4fefa4fc31138f4147f2a5abb88b Mon Sep 17 00:00:00 2001
From: Steve Twiss <stwiss.opensource@diasemi.com>
Date: Wed, 20 Jul 2016 15:53:58 +0100
Subject: [PATCH] regulator: da9053/52: Fix incorrectly stated minimum and
 maximum voltage limits

This fix alters the minimum and maximum BUCK voltage limits for DA9052 and
DA9053. It does so for the following cases:

DA9052
- BUCK3 (MEM)
   min: 0.925V -> 0.950V
   max: 2.500V -> 2.525V

DA9053
- BUCK3 (MEM)
   min: 0.925V -> 0.950V
   max: 2.500V -> 2.525V
- BUCK4 (PERI)
   min: 0.925V -> 0.950V
   max: 2.500V -> 2.525V

The voltage range remains the same, but the limits are shifted by +0.025V.

This change is provided on DA9052:MEM, DA9053:MEM and DA9053:PERI
and is a voltage difference of 0.025V, compared to those measured before
this fix is applied. The patch has the effect of decreasing *all* measured
voltages on those BUCKs when compared against the previously measured
values for the same software voltage request.

For example, with this fix applied for DA9052:MEM, DA9053:MEM and
DA9053:PERI, the following is true.

Because the previous software defined slot 0 as being 0.925V, if a request
for 0.950V was previously sent, the slot 1 voltage would have been used.
This would have corresponded to an actual measured voltage of 0.975V. But,
with this patch fix, and with slot 0 properly aligned to 0.950V, if a
voltage of 0.950V is requested by software, a measured value of 0.950V will
be provided.

Tested-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/da9052-regulator.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index 1050cb77561a..9ececfef42d6 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -333,7 +333,7 @@ static const struct regulator_ops da9052_ldo_ops = {
 static struct da9052_regulator_info da9052_regulator_info[] = {
 	DA9052_DCDC(BUCK1, 25, 500, 2075, 6, 6, DA9052_SUPPLY_VBCOREGO),
 	DA9052_DCDC(BUCK2, 25, 500, 2075, 6, 6, DA9052_SUPPLY_VBPROGO),
-	DA9052_DCDC(BUCK3, 25, 925, 2500, 6, 6, DA9052_SUPPLY_VBMEMGO),
+	DA9052_DCDC(BUCK3, 25, 950, 2525, 6, 6, DA9052_SUPPLY_VBMEMGO),
 	DA9052_DCDC(BUCK4, 50, 1800, 3600, 5, 6, 0),
 	DA9052_LDO(LDO1, 50, 600, 1800, 5, 6, 0),
 	DA9052_LDO(LDO2, 25, 600, 1800, 6, 6, DA9052_SUPPLY_VLDO2GO),
@@ -350,8 +350,8 @@ static struct da9052_regulator_info da9052_regulator_info[] = {
 static struct da9052_regulator_info da9053_regulator_info[] = {
 	DA9052_DCDC(BUCK1, 25, 500, 2075, 6, 6, DA9052_SUPPLY_VBCOREGO),
 	DA9052_DCDC(BUCK2, 25, 500, 2075, 6, 6, DA9052_SUPPLY_VBPROGO),
-	DA9052_DCDC(BUCK3, 25, 925, 2500, 6, 6, DA9052_SUPPLY_VBMEMGO),
-	DA9052_DCDC(BUCK4, 25, 925, 2500, 6, 6, 0),
+	DA9052_DCDC(BUCK3, 25, 950, 2525, 6, 6, DA9052_SUPPLY_VBMEMGO),
+	DA9052_DCDC(BUCK4, 25, 950, 2525, 6, 6, 0),
 	DA9052_LDO(LDO1, 50, 600, 1800, 5, 6, 0),
 	DA9052_LDO(LDO2, 25, 600, 1800, 6, 6, DA9052_SUPPLY_VLDO2GO),
 	DA9052_LDO(LDO3, 25, 1725, 3300, 6, 6, DA9052_SUPPLY_VLDO3GO),
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-20 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-20 14:53 [PATCH V1] regulator: da9053/52: Fix incorrectly stated minimum and maximum voltage limits Steve Twiss
2016-07-20 16:43 ` Applied "regulator: da9053/52: Fix incorrectly stated minimum and maximum voltage limits" to the regulator tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox