Gru: change the sd power sequency
In the safety considerations, we should make sure the slot of SD is enabled first, since we want to the power switch of corresponding is powered up. The different boards have the different power switch for sdmmc. Some power switch IC need turn on delay for long time. let's move the slot power of SD to romstage and avoid explicit delays or per-board. BRANCH=none BUG=b:35813418, b:35573103 TEST=check the signal for children of gru, and boot up from sd card. Change-Id: I48ab543143d3de9be46608fc12d78e09decf8d79 Signed-off-by: Caesar Wang <wxt@rock-chips.com> Reviewed-on: https://chromium-review.googlesource.com/447076 Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
parent
59823d9403
commit
ea1b01cc13
2 changed files with 9 additions and 1 deletions
|
|
@ -155,7 +155,6 @@ static void register_poweroff_to_bl31(void)
|
|||
|
||||
static void configure_sdmmc(void)
|
||||
{
|
||||
gpio_output(GPIO(4, D, 5), 1); /* SDMMC_PWR_EN */
|
||||
gpio_output(GPIO(2, A, 2), 1); /* SDMMC_SDIO_PWR_EN */
|
||||
|
||||
/* SDMMC_DET_L is different on Kevin board revision 0. */
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include <arch/mmu.h>
|
||||
#include <cbfs.h>
|
||||
#include <cbmem.h>
|
||||
#include <gpio.h>
|
||||
#include <console/console.h>
|
||||
#include <program_loading.h>
|
||||
#include <romstage_handoff.h>
|
||||
|
|
@ -40,6 +41,13 @@ static void init_dvs_outputs(void)
|
|||
pwm_regulator_configure(PWM_REGULATOR_CENTERLOG, 950);
|
||||
}
|
||||
|
||||
static void prepare_sdmmc(void)
|
||||
{
|
||||
/* Enable main SD rail early to allow ramp time before enabling SDIO
|
||||
* rail. */
|
||||
gpio_output(GPIO(4, D, 5), 1); /* SDMMC_PWR_EN */
|
||||
}
|
||||
|
||||
static void prepare_usb(void)
|
||||
{
|
||||
/*
|
||||
|
|
@ -59,6 +67,7 @@ void main(void)
|
|||
/* Init DVS to conservative values. */
|
||||
init_dvs_outputs();
|
||||
|
||||
prepare_sdmmc();
|
||||
prepare_usb();
|
||||
|
||||
sdram_init(get_sdram_config());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue