summaryrefslogtreecommitdiff
path: root/src/mainboard/google/veyron_danger
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/veyron_danger')
-rw-r--r--src/mainboard/google/veyron_danger/Kconfig2
-rw-r--r--src/mainboard/google/veyron_danger/mainboard.c15
-rw-r--r--src/mainboard/google/veyron_danger/sdram_configs.c7
3 files changed, 22 insertions, 2 deletions
diff --git a/src/mainboard/google/veyron_danger/Kconfig b/src/mainboard/google/veyron_danger/Kconfig
index 96f555068d..b11f454d71 100644
--- a/src/mainboard/google/veyron_danger/Kconfig
+++ b/src/mainboard/google/veyron_danger/Kconfig
@@ -43,7 +43,7 @@ config MAINBOARD_DIR
config MAINBOARD_PART_NUMBER
string
- default "Veyron_Brain"
+ default "Veyron_Danger"
config MAINBOARD_VENDOR
string
diff --git a/src/mainboard/google/veyron_danger/mainboard.c b/src/mainboard/google/veyron_danger/mainboard.c
index 3d498783b5..4d817e65b0 100644
--- a/src/mainboard/google/veyron_danger/mainboard.c
+++ b/src/mainboard/google/veyron_danger/mainboard.c
@@ -46,6 +46,20 @@ static void configure_usb(void)
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)
{
writel(IOMUX_EMMCDATA, &rk3288_grf->iomux_emmcdata);
@@ -87,6 +101,7 @@ static void mainboard_init(device_t dev)
gpio_output(GPIO_RESET, 0);
configure_usb();
+ configure_sdmmc();
configure_emmc();
configure_codec();
configure_vop();
diff --git a/src/mainboard/google/veyron_danger/sdram_configs.c b/src/mainboard/google/veyron_danger/sdram_configs.c
index 359375830c..b8bd2db41a 100644
--- a/src/mainboard/google/veyron_danger/sdram_configs.c
+++ b/src/mainboard/google/veyron_danger/sdram_configs.c
@@ -45,8 +45,13 @@ static struct rk3288_sdram_params sdram_configs[] = {
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)
|| sdram_configs[ramcode].dramtype == UNUSED)
die("Invalid RAMCODE.");