42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
|
From d0f999c94e936f05a761bfe219830d0e8c331de8 Mon Sep 17 00:00:00 2001
|
||
|
From: Samuel Holland <samuel@sholland.org>
|
||
|
Date: Thu, 18 Jun 2020 18:24:32 -0500
|
||
|
Subject: [PATCH 1/5] drivers: allwinner: axp: Do not force DRIVEVBUS on
|
||
|
|
||
|
It is not necessarily safe to enable DRIVEVBUS at boot. For example,
|
||
|
in a battery-powered device where VBUS is used for charging, enabling
|
||
|
DRIVEVBUS at boot causes a loop and prevents charging from a
|
||
|
dead-battery condition.
|
||
|
|
||
|
Furthermore, since bit 4 of register 0x8f is cleared by default and is
|
||
|
persisted across reboots, it is never useful to explicitly clear it.
|
||
|
For this reason, remove the whole code block.
|
||
|
|
||
|
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||
|
Change-Id: I26d75b229f235e8c5630e75aadcfc02dc9ca24b2
|
||
|
---
|
||
|
drivers/allwinner/axp/common.c | 7 -------
|
||
|
1 file changed, 7 deletions(-)
|
||
|
|
||
|
diff --git a/drivers/allwinner/axp/common.c b/drivers/allwinner/axp/common.c
|
||
|
index 13437fec8..cbd2e8818 100644
|
||
|
--- a/drivers/allwinner/axp/common.c
|
||
|
+++ b/drivers/allwinner/axp/common.c
|
||
|
@@ -120,13 +120,6 @@ void axp_setup_regulators(const void *fdt)
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
- /* This applies to AXP803 only. */
|
||
|
- if (fdt_getprop(fdt, node, "x-powers,drive-vbus-en", NULL)) {
|
||
|
- axp_clrbits(0x8f, BIT(4));
|
||
|
- axp_setbits(0x30, BIT(2));
|
||
|
- INFO("PMIC: Enabling DRIVEVBUS\n");
|
||
|
- }
|
||
|
-
|
||
|
/* descend into the "regulators" subnode */
|
||
|
node = fdt_subnode_offset(fdt, node, "regulators");
|
||
|
if (node < 0) {
|
||
|
--
|
||
|
2.28.0
|
||
|
|