summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorJimmy Zhang <jimmzhang@nvidia.com>2015-01-06 13:42:26 -0800
committerPatrick Georgi <pgeorgi@google.com>2015-04-14 09:04:29 +0200
commitd046fe86d8388b1a792538dfc9eda627885cb12b (patch)
tree6f8a44b1d33bab41fc7e24f8eaf697c2ee3f020b /src/mainboard
parentcfc0cff14b51f06980362ecb15466c7f539c99d2 (diff)
downloadcoreboot-d046fe86d8388b1a792538dfc9eda627885cb12b.tar.xz
rush: Configure display related clock, pad, and power
BUG=chrome-os-partner:34336 BRANCH=none TEST=build rush Change-Id: I9c2235ccc5571f1919dc013c62488390fe31dcbc Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 7468c14842c680be81620ad3fd2ea9ae056d525f Original-Change-Id: Iaf7f70727fc914b9bb2d063c9a30ece4451d40da Original-Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com> Original-Reviewed-on: https://chromium-review.googlesource.com/238942 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9613 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/rush/mainboard.c42
1 files changed, 41 insertions, 1 deletions
diff --git a/src/mainboard/google/rush/mainboard.c b/src/mainboard/google/rush/mainboard.c
index 0b85cc0356..2ea0841138 100644
--- a/src/mainboard/google/rush/mainboard.c
+++ b/src/mainboard/google/rush/mainboard.c
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright 2014 Google Inc.
+ * Copyright 2015 Google Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -32,6 +32,9 @@
#include <soc/nvidia/tegra/dc.h>
#include <soc/display.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+#include <delay.h>
+
static const struct pad_config sdmmc3_pad[] = {
/* MMC3(SDCARD) */
PAD_CFG_SFIO(SDMMC3_CLK, PINMUX_INPUT_ENABLE, SDMMC3),
@@ -68,6 +71,18 @@ static const struct pad_config padcfgs[] = {
* voltage source likes to drive them low on overcurrent conditions */
PAD_CFG_GPIO_INPUT(USB_VBUS_EN0, PINMUX_PULL_UP),
PAD_CFG_GPIO_INPUT(USB_VBUS_EN1, PINMUX_PULL_UP),
+
+ /* backlight_vdd_gpio: P2 */
+ PAD_CFG_GPIO_OUT0(DAP3_DOUT, PINMUX_PULL_NONE),
+
+ /* backlight_en_gpio: H2 */
+ PAD_CFG_GPIO_OUT0(GPIO_PH2, PINMUX_PULL_NONE),
+
+ /* backlight_pwm: H1 */
+ PAD_CFG_SFIO(GPIO_PH1, PINMUX_PULL_NONE, PWM1),
+
+ /* DP HPD */
+ PAD_CFG_SFIO(DP_HPD, PINMUX_INPUT_ENABLE, DP),
};
static const struct pad_config i2c1_pad[] = {
@@ -112,6 +127,27 @@ static const struct funit_cfg audio_funit[] = {
FUNIT_CFG(I2S1, CLK_M, 1500, i2s1_pad, ARRAY_SIZE(i2s1_pad)),
};
+static void configure_display_clocks(void)
+{
+ u32 lclks = CLK_L_DISP1 | CLK_L_HOST1X | CLK_L_PWM;
+ u32 xclks = CLK_X_DPAUX | CLK_X_SOR0;
+
+ clock_enable_clear_reset(lclks, 0, 0, 0, 0, xclks);
+
+ /* Give clocks time to stabilize. */
+ udelay(IO_STABILIZATION_DELAY);
+}
+
+static int configure_display_blocks(void)
+{
+ soc_configure_host1x();
+
+ /* enable display related clocks */
+ configure_display_clocks();
+
+ return 0;
+}
+
/* Audio init: clocks and enables/resets */
static void setup_audio(void)
{
@@ -146,6 +182,10 @@ static void mainboard_init(device_t dev)
setup_audio();
i2c_init(I2C1_BUS); /* for max98090 codec */
+
+ /* if panel needs to bringup */
+ if (!vboot_skip_display_init())
+ configure_display_blocks();
}
void display_startup(device_t dev)