From cc0b93a9d680445f973e8c8d585588acbeaea035 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Wed, 22 Apr 2015 15:05:18 -0700 Subject: [PATCH] veyron_danger: Turn on backlight enable before VCC_LCD On current Danger boards, VCC_LCD is gated by BL_EN. Thus we need to enable BL_EN in order to power on the display so that we can read the EDID and set things up. Later board revisions may change this ordering, but for now it doesn't seem to be causing a significant issues (no noticable "snow" or other corruption using Pepto display). BUG=none BRANCH=none TEST=booted on Danger, saw dev mode screen come up Reviewed-on: https://chromium-review.googlesource.com/266913 Reviewed-by: Julius Werner Change-Id: Iaf17cc4682bd3c46f62cba789e3ecf8d5a474362 Signed-off-by: David Hendricks Reviewed-on: https://chromium-review.googlesource.com/284082 --- src/mainboard/google/veyron_danger/board.h | 1 + src/mainboard/google/veyron_danger/mainboard.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/mainboard/google/veyron_danger/board.h b/src/mainboard/google/veyron_danger/board.h index 06134c8fa9..025eac25eb 100644 --- a/src/mainboard/google/veyron_danger/board.h +++ b/src/mainboard/google/veyron_danger/board.h @@ -25,6 +25,7 @@ #define GPIO_BACKLIGHT GPIO(7, A, 3) #define GPIO_RESET GPIO(0, B, 5) +#define GPIO_LCDC_BL GPIO(7, A, 7) /* TODO: move setup_chromeos_gpios() here once bootblock code is in mainboard */ diff --git a/src/mainboard/google/veyron_danger/mainboard.c b/src/mainboard/google/veyron_danger/mainboard.c index 20e2e0ef18..c2cfa2488e 100644 --- a/src/mainboard/google/veyron_danger/mainboard.c +++ b/src/mainboard/google/veyron_danger/mainboard.c @@ -93,6 +93,17 @@ static void configure_vop(void) /* lcdc(vop) iodomain select 1.8V */ writel(RK_SETBITS(1 << 0), &rk3288_grf->io_vsel); + /* + * BL_EN gates VCC_LCD. This might be changed in future revisions + * of the board so that the display can be stablized before we + * turn on the backlight. + * + * To minimize display corruption, turn off LCDC_BL before + * powering on the backlight. + */ + gpio_output(GPIO_BACKLIGHT, 1); /* BL_EN */ + gpio_output(GPIO_LCDC_BL, 0); + rk808_configure_switch(2, 1); /* VCC18_LCD (HDMI_AVDD_1V8) */ rk808_configure_ldo(7, 1000); /* VDD10_LCD (HDMI_AVDD_1V0) */ rk808_configure_switch(1, 1); /* VCC33_LCD */ @@ -131,5 +142,5 @@ void lb_board(struct lb_header *header) void mainboard_power_on_backlight(void) { - gpio_output(GPIO_BACKLIGHT, 1); /* BL_EN */ + gpio_output(GPIO_LCDC_BL, 1); }