Tristan Hsieh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32498
Change subject: mediatek/mt8183: Wait 200us for voltages to settle ......................................................................
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 --- M src/soc/mediatek/mt8183/mt6358.c 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/32498/1
diff --git a/src/soc/mediatek/mt8183/mt6358.c b/src/soc/mediatek/mt8183/mt6358.c index 8162e3a..7054243 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 @@
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 */; }
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32498 )
Change subject: mediatek/mt8183: Wait 200us for voltages to settle ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/32498/1/src/soc/mediatek/mt8183/mt6358.c File src/soc/mediatek/mt8183/mt6358.c:
https://review.coreboot.org/#/c/32498/1/src/soc/mediatek/mt8183/mt6358.c@791 PS1, Line 791: while (!stopwatch_expired(&voltage_settled)) suspect code indent for conditional statements (8, 49)
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32498 )
Change subject: mediatek/mt8183: Wait 200us for voltages to settle ......................................................................
Patch Set 1: Code-Review+1
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32498 )
Change subject: mediatek/mt8183: Wait 200us for voltages to settle ......................................................................
Patch Set 1: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/32498 )
Change subject: mediatek/mt8183: Wait 200us for voltages to settle ......................................................................
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 --- M src/soc/mediatek/mt8183/mt6358.c 1 file changed, 6 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved You-Cheng Syu: Looks good to me, but someone else must approve
diff --git a/src/soc/mediatek/mt8183/mt6358.c b/src/soc/mediatek/mt8183/mt6358.c index 8162e3a..7054243 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 @@
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 */; }