From ccecd457df8c93531333bde66bd5d304970a9947 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Fri, 25 Sep 2015 15:27:46 -0700 Subject: [PATCH] google/veyron_rialto: Reduce voltage and frequency in recovery mode This applies CL:300617 to Rialto to down throttle further in recovery mode. BUG=chrome-os-partner:42054 BRANCH=none TEST=Saw print statment in recovery mode with image.serial.bin, device only got mildly warm after several minutes (not hot). Change-Id: I08b6024d31c83c6bbd8c8d9d9a07adc9835e81fd Signed-off-by: Patrick Georgi Original-Commit-Id: 74eb9143fbe13df5f386185eab9e5ba9df27cadf Original-Signed-off-by: David Hendricks Original-Change-Id: I9e57d826750cb523c115332fa13a6143bcff7449 Original-Reviewed-on: https://chromium-review.googlesource.com/302631 Reviewed-on: http://review.coreboot.org/12135 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks --- src/mainboard/google/veyron_rialto/mainboard.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mainboard/google/veyron_rialto/mainboard.c b/src/mainboard/google/veyron_rialto/mainboard.c index c2dde19a72..35de7e0508 100644 --- a/src/mainboard/google/veyron_rialto/mainboard.c +++ b/src/mainboard/google/veyron_rialto/mainboard.c @@ -91,6 +91,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)