diff options
author | Tristan Shieh <tristan.shieh@mediatek.com> | 2019-04-29 09:12:54 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-05-06 10:27:53 +0000 |
commit | b75f493ed7fafb6a933a3f47e1e90803b18fcb65 (patch) | |
tree | 58d51428a6b4c1987fd98cae4596aaef264f8508 | |
parent | 3fe7c44d501d64cfcc5cd79fbc02f7071bdfda4b (diff) |
mediatek/mt8183: Wait 200us for voltages to settle
When we increase voltages, it takes 200us for voltages to stablize.
BUG=b:80501386
BRANCH=none
Test=Boots correctly on Kukui
Change-Id: I5f32035693b6084dbe763411c612ae5d1f7c9e48
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32498
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: You-Cheng Syu <youcheng@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r-- | src/soc/mediatek/mt8183/mt6358.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8183/mt6358.c b/src/soc/mediatek/mt8183/mt6358.c index 8162e3aaf1..705424337f 100644 --- a/src/soc/mediatek/mt8183/mt6358.c +++ b/src/soc/mediatek/mt8183/mt6358.c @@ -16,6 +16,7 @@ #include <console/console.h> #include <soc/pmic_wrap.h> #include <soc/mt6358.h> +#include <timer.h> static struct pmic_setting init_setting[] = { /* [15:0]: TMA_KEY */ @@ -775,13 +776,18 @@ static void mt6358_lp_setting(void) void mt6358_init(void) { + struct stopwatch voltage_settled; + if (pwrap_init()) die("ERROR - Failed to initialize pmic wrap!"); pmic_set_power_hold(true); pmic_wdt_set(); mt6358_init_setting(); + stopwatch_init_usecs_expire(&voltage_settled, 200); wk_sleep_voltage_by_ddr(); wk_power_down_seq(); mt6358_lp_setting(); + while (!stopwatch_expired(&voltage_settled)) + /* wait for voltages to settle */; } |