mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
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: I8283596565d552b1f3db31c28621a1601c226999 Signed-off-by: Lin Huang <hl@rock-chips.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/349702 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
This commit is contained in:
parent
53844cb28b
commit
ad6231b121
1 changed files with 21 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <device/device.h>
|
||||
#include <device/i2c.h>
|
||||
#include <gpio.h>
|
||||
#include <soc/bl31_plat_params.h>
|
||||
#include <soc/clock.h>
|
||||
#include <soc/display.h>
|
||||
#include <soc/emmc.h>
|
||||
|
@ -28,6 +29,8 @@
|
|||
|
||||
#include "board.h"
|
||||
|
||||
#include "board.h"
|
||||
|
||||
static void configure_emmc(void)
|
||||
{
|
||||
/* Host controller does not support programmable clock generator.
|
||||
|
@ -44,6 +47,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 +152,7 @@ static void mainboard_init(device_t dev)
|
|||
configure_codec();
|
||||
configure_display();
|
||||
setup_usb();
|
||||
register_reset_to_bl31();
|
||||
}
|
||||
|
||||
static void enable_backlight_booster(void)
|
||||
|
|
Loading…
Add table
Reference in a new issue