From 9e86c6decb780ffff533ed15101067d60f3fec4c Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Tue, 15 Sep 2015 19:37:44 -0700 Subject: [PATCH] veyron_mickey: Reduce voltage and frequency in recovery mode If recovery mode is detected, throttle down APLL frequency to 600MHz and VDD_ARM to 900mV. This is intended to mitigate the possibility of thermal shutdown if the system is left at the recovery screen for a long period of time. Experimentally, going lower than 600MHz didn't help decrease temperature significantly and added a few seconds to recovery boot time. BUG=chrome-os-partner:41201 BRANCH=firmware-veyron TEST=built and booted on mickey, normal mode boot time was normal (~1.8s) and RK808 temperature remained steady at recovery screen for ~14 hours. Signed-off-by: David Hendricks Change-Id: I82cbc1f591cbfae5ccf4e99e468f2b053c835639 Reviewed-on: https://chromium-review.googlesource.com/299718 Reviewed-by: Julius Werner Commit-Queue: David Hendricks Tested-by: David Hendricks --- src/mainboard/google/veyron_mickey/mainboard.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mainboard/google/veyron_mickey/mainboard.c b/src/mainboard/google/veyron_mickey/mainboard.c index 2c9dc89128..0644c4ad80 100644 --- a/src/mainboard/google/veyron_mickey/mainboard.c +++ b/src/mainboard/google/veyron_mickey/mainboard.c @@ -102,6 +102,14 @@ static void mainboard_init(device_t dev) elog_init(); elog_add_watchdog_reset(); elog_add_boot_reason(); + + /* If recovery mode is detected, reduce frequency and voltage to reduce + * heat in case machine is left unattended. chrome-os-partner:41201. */ + if (recovery_mode_enabled()) { + printk(BIOS_DEBUG, "Reducing APLL freq for recovery mode.\n"); + rkclk_configure_cpu(APLL_600_MHZ); + rk808_configure_buck(1, 900); + } } static void mainboard_enable(device_t dev)