From c994fd1bf8ab401dc3b19b9215d616c892d8b868 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Mon, 1 Jun 2015 15:17:24 -0700 Subject: [PATCH] veyron_danger: EDP changes for v2 EDP-related hardware modifications for v2: - BL_EN moved from GPIO7_A3 to GPIO7_A2 - EDP_HPD added to GPIO7_B3 (write32() --> writel() for cherry-pick) BUG=none BRANCH=none TEST=built and booted Danger v2 with EDP panel attached, saw dev mode screen come up Signed-off-by: David Hendricks Reviewed-on: https://chromium-review.googlesource.com/280855 Reviewed-by: Julius Werner Change-Id: Id271cdcfcde6fa84c1bb707b9842bddd77a7121b Reviewed-on: https://chromium-review.googlesource.com/284094 --- .../google/veyron_danger/mainboard.c | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/mainboard/google/veyron_danger/mainboard.c b/src/mainboard/google/veyron_danger/mainboard.c index 3c4aee6d02..a40ac84556 100644 --- a/src/mainboard/google/veyron_danger/mainboard.c +++ b/src/mainboard/google/veyron_danger/mainboard.c @@ -99,10 +99,32 @@ static void configure_vop(void) * 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); + switch (board_id()) { + case 0: + gpio_output(GPIO(7, A, 3), 1); + break; + default: + gpio_output(GPIO(7, A, 2), 1); + break; + } + gpio_output(GPIO_LCDC_BL, 0); rk808_configure_switch(1, 1); /* VCC33_LCD */ + + /* EDP_HPD setup */ + switch (board_id()) { + case 0: + /* not present */ + break; + default: + /* Unlike other Veyrons, Danger has external pull resistors on + * EDP_HPD. Default for GPIO(7, B, 3) is pull-down, set to + * float. + */ + gpio_input(GPIO(7, B, 3)); + writel(IOMUX_EDP_HOTPLUG, &rk3288_grf->iomux_edp_hotplug); + break; + } } static void configure_hdmi(void)