Danger: Apply differences between Brain and Danger

This applies the differences between Brain and Danger:
- Danger has an SDMMC slot
- Danger has a USB hub (TODO)
- Danger has LVDS (TODO)
- Add workaround for incorrect RAM_ID strapping

BUG=none
BRANCH=none
TEST=emerge-veyron_danger coreboot works

Change-Id: Idec527744de2583613b290e3e88850b33ff1c23d
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Original-Commit-Id: 89278c2eeae4bae989a3549da627c5bbd5dd0d5a
Original-Signed-off-by: David Hendricks <dhendrix@chromium.org>
Original-Change-Id: Iae3f85d4f41e04465a5046f2334c693337d006a4
Original-Reviewed-on: https://chromium-review.googlesource.com/241712
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: http://review.coreboot.org/9647
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
This commit is contained in:
David Hendricks 2015-01-16 12:15:15 -08:00 committed by Stefan Reinauer
parent 09ab856c85
commit 3be454e5eb
3 changed files with 22 additions and 2 deletions

View File

@ -43,7 +43,7 @@ config MAINBOARD_DIR
config MAINBOARD_PART_NUMBER config MAINBOARD_PART_NUMBER
string string
default "Veyron_Brain" default "Veyron_Danger"
config MAINBOARD_VENDOR config MAINBOARD_VENDOR
string string

View File

@ -46,6 +46,20 @@ static void configure_usb(void)
gpio_output(GPIO(7, C, 5), 1); /* 5V_DRV */ gpio_output(GPIO(7, C, 5), 1); /* 5V_DRV */
} }
static void configure_sdmmc(void)
{
writel(IOMUX_SDMMC0, &rk3288_grf->iomux_sdmmc0);
/* use sdmmc0 io, disable JTAG function */
writel(RK_CLRBITS(1 << 12), &rk3288_grf->soc_con0);
/* Note: these power rail definitions are copied in romstage.c */
rk808_configure_ldo(4, 3300); /* VCCIO_SD */
rk808_configure_ldo(5, 3300); /* VCC33_SD */
gpio_input(GPIO(7, A, 5)); /* SDMMC_DET_L */
}
static void configure_emmc(void) static void configure_emmc(void)
{ {
writel(IOMUX_EMMCDATA, &rk3288_grf->iomux_emmcdata); writel(IOMUX_EMMCDATA, &rk3288_grf->iomux_emmcdata);
@ -87,6 +101,7 @@ static void mainboard_init(device_t dev)
gpio_output(GPIO_RESET, 0); gpio_output(GPIO_RESET, 0);
configure_usb(); configure_usb();
configure_sdmmc();
configure_emmc(); configure_emmc();
configure_codec(); configure_codec();
configure_vop(); configure_vop();

View File

@ -45,8 +45,13 @@ static struct rk3288_sdram_params sdram_configs[] = {
const struct rk3288_sdram_params *get_sdram_config() const struct rk3288_sdram_params *get_sdram_config()
{ {
u32 ramcode = ram_code(); u32 ramcode;
/* early boards had incorrect config */
if (board_id() == 0)
return &sdram_configs[0];
ramcode = ram_code();
if (ramcode >= ARRAY_SIZE(sdram_configs) if (ramcode >= ARRAY_SIZE(sdram_configs)
|| sdram_configs[ramcode].dramtype == UNUSED) || sdram_configs[ramcode].dramtype == UNUSED)
die("Invalid RAMCODE."); die("Invalid RAMCODE.");