From 5f3a7d098ea0e70bcd1566b5d104438389c5d26c Mon Sep 17 00:00:00 2001 From: Jarried Lin Date: Fri, 1 Nov 2024 15:22:04 +0800 Subject: mb/google/rauru: Initialize DPM in ramstage Add initialization of DPM drvier for DRAM low power mode. This DPM flow adds 3ms to the boot time, making the total boot time 860ms. coreboot logs: CBFS: Found 'dpm.dm' @0x19880 size 0x5b7 in mcache @0xfffdd1fc mtk_init_mcu: Loaded (and reset) dpm.dm in 0 msecs (1888 bytes) CBFS: Found 'dpm.pm' @0x19ec0 size 0x7fb5 in mcache @0xfffdd258 mtk_init_mcu: Loaded (and reset) dpm.pm in 3 msecs (43844 bytes) TEST=Build pass. Check with cbmem -1. BUG=b:317009620 Change-Id: Ib855e133a30067fc89c88d5c0fb454cc78504ff3 Signed-off-by: Crystal Guo Reviewed-on: https://review.coreboot.org/c/coreboot/+/85122 Reviewed-by: Yu-Ping Wu Reviewed-by: Yidi Lin Tested-by: build bot (Jenkins) --- src/mainboard/google/rauru/mainboard.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/rauru/mainboard.c b/src/mainboard/google/rauru/mainboard.c index c2d24e1228..94a257fe3c 100644 --- a/src/mainboard/google/rauru/mainboard.c +++ b/src/mainboard/google/rauru/mainboard.c @@ -1,8 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include #include #include #include +#include #include #include @@ -25,6 +27,9 @@ static void mainboard_init(struct device *dev) setup_usb_host(); power_on_fpmcu(); + if (dpm_init()) + printk(BIOS_ERR, "dpm init failed, DVFS may not work\n"); + if (CONFIG(ARM64_USE_ARM_TRUSTED_FIRMWARE)) register_reset_to_bl31(GPIO_AP_EC_WARM_RST_REQ.id, true); } -- cgit v1.2.3