diff options
author | Jarried Lin <jarried.lin@mediatek.corp-partner.google.com> | 2024-11-01 15:22:04 +0800 |
---|---|---|
committer | Yu-Ping Wu <yupingso@google.com> | 2024-11-21 13:47:09 +0000 |
commit | 5f3a7d098ea0e70bcd1566b5d104438389c5d26c (patch) | |
tree | 88bee51d26a3d0aad0113f4e8ab03aa062e6bc48 /src/mainboard/google/rauru | |
parent | feddd37297d2157504540aa861e86e7e2aeba782 (diff) |
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 <crystal.guo@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85122
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/rauru')
-rw-r--r-- | src/mainboard/google/rauru/mainboard.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 <console/console.h> #include <device/device.h> #include <gpio.h> #include <soc/bl31.h> +#include <soc/dpm_v2.h> #include <soc/pcie.h> #include <soc/usb.h> @@ -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); } |