summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorRoger Lu <roger.lu@mediatek.com>2020-07-10 15:29:31 +0800
committerHung-Te Lin <hungte@chromium.org>2020-12-10 03:22:36 +0000
commita5f472bf57e8897c4c47dce6050f0dfacfca5f13 (patch)
treed1c6fa3b61f3bb65b0c1bd60f5116741c298ca73 /src/mainboard/google
parenteb69dd60ef995ddddd2c831bc006e7397ddbcf79 (diff)
soc/mediatek/mt8192: add spmfw loader
This patch adds support for loading spm firmware from cbfs to spm sram. Spm needs its own firmware to enable spm suspend/resume function which turns off several resources such as DRAM/mainpll/26M clk when linux system suspend. BUG=b:159079649 TEST=suspend with command `powerd_dbus_suspend` and wake up the DUT by powerkey Signed-off-by: Roger Lu <roger.lu@mediatek.com> Change-Id: I6478b98f426d2f3e0ee919d37d21d909ae8a6371 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46389 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/asurada/mainboard.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mainboard/google/asurada/mainboard.c b/src/mainboard/google/asurada/mainboard.c
index e00eb2fde4..0701c678d6 100644
--- a/src/mainboard/google/asurada/mainboard.c
+++ b/src/mainboard/google/asurada/mainboard.c
@@ -6,6 +6,7 @@
#include <device/mmio.h>
#include <soc/gpio.h>
#include <soc/regulator.h>
+#include <soc/spm.h>
#include <soc/usb.h>
#include "gpio.h"
@@ -107,6 +108,9 @@ static void mainboard_init(struct device *dev)
setup_usb_host();
register_reset_to_bl31();
+
+ if (spm_init())
+ printk(BIOS_ERR, "spm init fail, system suspend may stuck\n");
}
static void mainboard_enable(struct device *dev)