From 4039822dc43fdcc301f416ea589c0c43d1e09244 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Wed, 3 Jun 2015 17:00:32 -0700 Subject: veyron_danger: Add basic HDMI support This adds a configure_hdmi() function that drives the HDMI enable output high and configures the iomux. We'll add EDP/HDMI auto-detection in an upcoming patch. BUG=none BRANCH=none TEST=set vop_mode to 1 in Danger's devicetree.cb and saw dev mode screen output to HDMI display. Change-Id: I2a208059fee74d436b5a5bedbc677bc59525f935 Signed-off-by: Patrick Georgi Original-Commit-Id: 721f326319f727afcf73a0c21d20d26cb463ad71 Original-Change-Id: I139d39749963d4121aaeec0c3da37d825ffa94ac Original-Signed-off-by: David Hendricks Original-Reviewed-on: https://chromium-review.googlesource.com/280849 Original-Reviewed-by: Julius Werner Reviewed-on: http://review.coreboot.org/10684 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/veyron_danger/mainboard.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mainboard/google/veyron_danger/mainboard.c b/src/mainboard/google/veyron_danger/mainboard.c index 175ff33072..621d347e1f 100644 --- a/src/mainboard/google/veyron_danger/mainboard.c +++ b/src/mainboard/google/veyron_danger/mainboard.c @@ -104,9 +104,27 @@ static void configure_vop(void) gpio_output(GPIO_BACKLIGHT, 1); /* BL_EN */ gpio_output(GPIO_LCDC_BL, 0); + rk808_configure_switch(1, 1); /* VCC33_LCD */ +} + +static void configure_hdmi(void) +{ 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 */ + + /* set POWER_HDMI_EN */ + switch (board_id()) { + case 0: + gpio_output(GPIO(7, A, 2), 1); + break; + default: + gpio_output(GPIO(5, C, 3), 1); + break; + } + + /* HDMI I2C */ + write32(&rk3288_grf->iomux_i2c5sda, IOMUX_HDMI_EDP_I2C_SDA); + write32(&rk3288_grf->iomux_i2c5scl, IOMUX_HDMI_EDP_I2C_SCL); } static void mainboard_init(device_t dev) @@ -118,6 +136,7 @@ static void mainboard_init(device_t dev) configure_emmc(); configure_codec(); configure_vop(); + configure_hdmi(); elog_init(); elog_add_watchdog_reset(); -- cgit v1.2.3