From c81187f2312ef3487fa6bd534dcc689317f9423e Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Thu, 1 Aug 2013 19:09:21 -0700 Subject: pit: disable LCD FETs before doing any graphics init This ensures that the LCD FETs are off before we do graphics init. FIXME: The location of the code is sub-optimal and should probably be done in romstage, but there are __PRE_RAM__ considerations to take into account. Signed-off-by: David Hendricks Change-Id: I0844030d0a0e51eee1d29f1762f0b495777268df Reviewed-on: https://gerrit.chromium.org/gerrit/64305 Reviewed-by: Ronald G. Minnich Commit-Queue: Ronald G. Minnich Tested-by: Ronald G. Minnich Reviewed-on: http://review.coreboot.org/4470 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/cpu/samsung/exynos5420/cpu.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src') diff --git a/src/cpu/samsung/exynos5420/cpu.c b/src/cpu/samsung/exynos5420/cpu.c index bda46de63d..5ff345eaa8 100644 --- a/src/cpu/samsung/exynos5420/cpu.c +++ b/src/cpu/samsung/exynos5420/cpu.c @@ -33,6 +33,8 @@ #include "usb.h" #include "chip.h" +#include + static unsigned int cpu_id; static unsigned int cpu_rev; @@ -141,6 +143,17 @@ static void exynos_displayport_init(device_t dev, u32 lcdbase, mmio_resource(dev, 1, lcdbase/KiB, (fb_size + KiB - 1)/KiB); } +static void tps65090_thru_ec_fet_disable(int index) +{ + uint8_t value = 0; + + if (google_chromeec_i2c_xfer(0x48, 0xe + index, 1, &value, 1, 0)) { + printk(BIOS_ERR, + "Error sending i2c pass through command to EC.\n"); + return; + } +} + static void cpu_enable(device_t dev) { unsigned long fb_size = FB_SIZE_KB * KiB; @@ -149,6 +162,14 @@ static void cpu_enable(device_t dev) ram_resource(dev, 0, RAM_BASE_KB, RAM_SIZE_KB - FB_SIZE_KB); mmio_resource(dev, 1, lcdbase / KiB, (fb_size + KiB - 1) / KiB); + /* + * Disable LCD FETs before we do anything with the display. + * FIXME(dhendrix): This is a gross hack and should be done + * elsewhere (romstage?). + */ + tps65090_thru_ec_fet_disable(1); + tps65090_thru_ec_fet_disable(6); + exynos_displayport_init(dev, lcdbase, fb_size); set_cpu_id(); -- cgit v1.2.3