diff options
author | Tristan Shieh <tristan.shieh@mediatek.com> | 2019-02-25 17:14:14 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-09-17 08:15:12 +0000 |
commit | 4d990ab1bb27a4e5b8d5cb0c817e69e4f5cae241 (patch) | |
tree | 78b878a716c7b1d3d5cf5a41f7973736eff69f70 /src/mainboard | |
parent | 99f83bbad4a7e060e05c3bb26203f92c1817445a (diff) |
google/kukui: Pass reset gpio parameter to BL31
To support gpio reset SoC, we need to pass the reset gpio parameter to
BL31.
BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui and ATF(BL31) can get this parameter.
Change-Id: Iefa70dc0714a9283a79f97d475b07ac047f5f3b0
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31605
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/kukui/mainboard.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index f34be6f51e..7b00d94ba6 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -14,6 +14,7 @@ */ #include <assert.h> +#include <bl31.h> #include <boardid.h> #include <bootmode.h> #include <cbfs.h> @@ -30,8 +31,11 @@ #include <soc/usb.h> #include <string.h> +#include "gpio.h" #include "panel.h" +#include <arm-trusted-firmware/include/export/plat/mediatek/common/plat_params_exp.h> + static void configure_emmc(void) { const gpio_t emmc_pin[] = { @@ -172,6 +176,17 @@ static bool configure_display(void) return true; } +static void register_reset_to_bl31(void) +{ + static struct bl_aux_param_gpio param_reset = { + .h = { .type = BL_AUX_PARAM_MTK_RESET_GPIO }, + .gpio = { .polarity = ARM_TF_GPIO_LEVEL_HIGH }, + }; + + param_reset.gpio.index = GPIO_RESET.id; + register_bl31_aux_param(¶m_reset.h); +} + static void mainboard_init(struct device *dev) { if (display_init_required()) { @@ -186,6 +201,8 @@ static void mainboard_init(struct device *dev) configure_emmc(); configure_usb(); configure_audio(); + + register_reset_to_bl31(); } static void mainboard_enable(struct device *dev) |