diff options
author | Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> | 2018-08-29 08:36:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-08-29 10:07:18 -0400 |
commit | 823f18f8b860526fc099c222619a126d57d2ad8c (patch) | |
tree | ca57661d48a35e7b5d8bef501f09b2bbfa18205d /drivers | |
parent | 5b394b2ddf0347bef56e50c69a58773c94343ff3 (diff) |
regulator: bd71837: Disable voltage monitoring for LDO3/4
There is a HW quirk in BD71837. The shutdown sequence timings for
bucks/LDOs which are enabled via register interface are changed.
At PMIC poweroff the voltage for BUCK6/7 is cut immediately at the
beginning of shut-down sequence. This causes LDO5/6 voltage
monitoring to detect under voltage and force PMIC to emergency
state instead of poweroff. Disable voltage monitoring for LDO5 and
LDO6 at probe to avoid this.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/bd71837-regulator.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c index 0f8ac8dec3e1..a1bd8aaf4d98 100644 --- a/drivers/regulator/bd71837-regulator.c +++ b/drivers/regulator/bd71837-regulator.c | |||
@@ -569,6 +569,25 @@ static int bd71837_probe(struct platform_device *pdev) | |||
569 | BD71837_REG_REGLOCK); | 569 | BD71837_REG_REGLOCK); |
570 | } | 570 | } |
571 | 571 | ||
572 | /* | ||
573 | * There is a HW quirk in BD71837. The shutdown sequence timings for | ||
574 | * bucks/LDOs which are controlled via register interface are changed. | ||
575 | * At PMIC poweroff the voltage for BUCK6/7 is cut immediately at the | ||
576 | * beginning of shut-down sequence. As bucks 6 and 7 are parent | ||
577 | * supplies for LDO5 and LDO6 - this causes LDO5/6 voltage | ||
578 | * monitoring to errorneously detect under voltage and force PMIC to | ||
579 | * emergency state instead of poweroff. In order to avoid this we | ||
580 | * disable voltage monitoring for LDO5 and LDO6 | ||
581 | */ | ||
582 | err = regmap_update_bits(pmic->mfd->regmap, BD718XX_REG_MVRFLTMASK2, | ||
583 | BD718XX_LDO5_VRMON80 | BD718XX_LDO6_VRMON80, | ||
584 | BD718XX_LDO5_VRMON80 | BD718XX_LDO6_VRMON80); | ||
585 | if (err) { | ||
586 | dev_err(&pmic->pdev->dev, | ||
587 | "Failed to disable voltage monitoring\n"); | ||
588 | goto err; | ||
589 | } | ||
590 | |||
572 | for (i = 0; i < ARRAY_SIZE(pmic_regulator_inits); i++) { | 591 | for (i = 0; i < ARRAY_SIZE(pmic_regulator_inits); i++) { |
573 | 592 | ||
574 | struct regulator_desc *desc; | 593 | struct regulator_desc *desc; |