From 5ca1f9a5bb24412aee6f6ed2c01cf423938ede03 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Thu, 25 Jun 2015 16:59:02 -0700 Subject: [PATCH] veyron_brain: Add basic HDMI support This adds a configure_hdmi() function that drives the HDMI enable output high and configures the iomux. Calls to PMIC functions to enable HDMI power are moved here as well. (write32() --> writel() for cherry-pick) BUG=none BRANCH=none TEST=with follow-up patches, we now get a dev screen on Brain. Signed-off-by: David Hendricks Reviewed-on: https://chromium-review.googlesource.com/282046 Change-Id: I0c6e9f8fc5e06f53a1a160d8ab2e32447168139e Reviewed-on: https://chromium-review.googlesource.com/284097 --- src/mainboard/google/veyron_brain/devicetree.cb | 1 + src/mainboard/google/veyron_brain/mainboard.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/mainboard/google/veyron_brain/devicetree.cb b/src/mainboard/google/veyron_brain/devicetree.cb index 59a18267aa..49d9f12626 100644 --- a/src/mainboard/google/veyron_brain/devicetree.cb +++ b/src/mainboard/google/veyron_brain/devicetree.cb @@ -21,5 +21,6 @@ chip soc/rockchip/rk3288 device cpu_cluster 0 on end register "vop_id" = "1" + register "vop_mode" = "VOP_MODE_HDMI" register "framebuffer_bits_per_pixel" = "16" end diff --git a/src/mainboard/google/veyron_brain/mainboard.c b/src/mainboard/google/veyron_brain/mainboard.c index 36333f41cc..0750f90c71 100644 --- a/src/mainboard/google/veyron_brain/mainboard.c +++ b/src/mainboard/google/veyron_brain/mainboard.c @@ -76,10 +76,20 @@ static void configure_vop(void) /* lcdc(vop) iodomain select 1.8V */ writel(RK_SETBITS(1 << 0), &rk3288_grf->io_vsel); +} +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_ON */ + gpio_output(GPIO(7, A, 2), 1); + + /* HDMI I2C */ + writel(IOMUX_HDMI_EDP_I2C_SDA, &rk3288_grf->iomux_i2c5sda); + writel(IOMUX_HDMI_EDP_I2C_SCL, &rk3288_grf->iomux_i2c5scl); } static void mainboard_init(device_t dev) @@ -90,6 +100,7 @@ static void mainboard_init(device_t dev) configure_emmc(); configure_codec(); configure_vop(); + configure_hdmi(); elog_init(); elog_add_watchdog_reset();