summaryrefslogtreecommitdiff
path: root/src/mainboard/google/veyron_danger
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2015-01-16 12:15:15 -0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-04-15 16:49:20 +0200
commit3be454e5ebeba8bdc82184ca12cb92c569cc908a (patch)
tree73320ab3e68175211d46c243c5b6006ada9c5b68 /src/mainboard/google/veyron_danger
parent09ab856c85b59a04bb14146533d19edd4ccf1467 (diff)
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>
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.");