summaryrefslogtreecommitdiff
path: root/src/mainboard/google/corsola
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>2021-11-17 17:45:42 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-11-26 11:22:21 +0000
commit47516553fb0e2ea9a0606763cf3ade3a76aed2b8 (patch)
tree7961f5e04d868e19b72519f519d1dc501016d600 /src/mainboard/google/corsola
parentc5e56f59486aae1ef11f8aab4da314d73ead1b8a (diff)
mb/google/corsola: Raise little CPU frequency
Raise little CPU to 2GHz at romstage. TEST=check little core cpu frequency is 2GHz BUG=b:202871018 Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Change-Id: If4c983d15beb2b588230f3db7416cb767b29978d Reviewed-on: https://review.coreboot.org/c/coreboot/+/59569 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/mainboard/google/corsola')
-rw-r--r--src/mainboard/google/corsola/romstage.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mainboard/google/corsola/romstage.c b/src/mainboard/google/corsola/romstage.c
index d1e9e20639..aff496b563 100644
--- a/src/mainboard/google/corsola/romstage.c
+++ b/src/mainboard/google/corsola/romstage.c
@@ -1,11 +1,29 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/stages.h>
+#include <console/console.h>
+#include <delay.h>
#include <soc/mt6366.h>
+#include <soc/pll_common.h>
+#include <soc/regulator.h>
#include <soc/rtc.h>
+static void raise_little_cpu_freq(void)
+{
+ mainboard_set_regulator_vol(MTK_REGULATOR_VPROC12, 1031250);
+ mainboard_set_regulator_vol(MTK_REGULATOR_VSRAM_PROC12, 1118750);
+ udelay(200);
+ mt_pll_raise_little_cpu_freq(2000 * MHz);
+ mt_pll_raise_cci_freq(1385 * MHz);
+
+ printk(BIOS_INFO, "Check CPU freq: %u KHz, cci: %u KHz\n",
+ mt_fmeter_get_freq_khz(FMETER_ABIST, 9),
+ mt_fmeter_get_freq_khz(FMETER_ABIST, 7));
+}
+
void platform_romstage_main(void)
{
mt6366_init();
+ raise_little_cpu_freq();
rtc_boot();
}