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>
This commit is contained in:
parent
eb69dd60ef
commit
a5f472bf57
5 changed files with 1134 additions and 31 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue