From 5a4be8a2c738a8424bf78b072d9a397f5bddca39 Mon Sep 17 00:00:00 2001 From: Lin Huang Date: Tue, 17 May 2016 15:45:53 +0800 Subject: rockchip: gru: pass reset gpio parameter to BL31 To support gpio reset SOC, we need to pass the reset gpio parameter to BL31. Note: request BL31 have supported this function. BRANCH=None BUG=chrome-os-partner:51924 TEST=Build gru Change-Id: I182cff11ce6f5dc3354db0dc053c128b813acf9f Signed-off-by: Martin Roth Original-Commit-Id: Original-Change-Id: I8283596565d552b1f3db31c28621a1601c226999 Original-Signed-off-by: Lin Huang Original-Signed-off-by: Douglas Anderson Original-Reviewed-on: https://chromium-review.googlesource.com/349702 Original-Reviewed-by: Vadim Bendebury Reviewed-on: https://review.coreboot.org/15118 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/mainboard/google/gru/mainboard.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/mainboard/google/gru') diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c index e6baebe13b..23051290a0 100644 --- a/src/mainboard/google/gru/mainboard.c +++ b/src/mainboard/google/gru/mainboard.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -44,6 +45,23 @@ static void configure_emmc(void) enable_emmc_clk(); } +static void register_reset_to_bl31(void) +{ + static struct bl31_gpio_param param_reset = { + .h = { + .type = PARAM_RESET, + }, + .gpio = { + .polarity = 1, + }, + }; + + /* gru/kevin reset pin: gpio0b3 */ + param_reset.gpio.index = GET_GPIO_NUM(GPIO_RESET), + + register_bl31_param(¶m_reset.h); +} + static void configure_sdmmc(void) { gpio_output(GPIO(4, D, 5), 1); /* SDMMC_PWR_EN */ @@ -132,6 +150,7 @@ static void mainboard_init(device_t dev) configure_codec(); configure_display(); setup_usb(); + register_reset_to_bl31(); } static void enable_backlight_booster(void) -- cgit v1.2.3