diff options
author | David Hendricks <dhendrix@chromium.org> | 2013-08-01 19:09:21 -0700 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2013-12-21 22:47:01 +0100 |
commit | c81187f2312ef3487fa6bd534dcc689317f9423e (patch) | |
tree | 5539ced8e4aeb23937b151bfb3d9d7fc5b3f55e8 /src/cpu/samsung | |
parent | 1ad77de62dabe68edd3792f2f6538224cb27773c (diff) |
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 <dhendrix@chromium.org>
Change-Id: I0844030d0a0e51eee1d29f1762f0b495777268df
Reviewed-on: https://gerrit.chromium.org/gerrit/64305
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Ronald G. Minnich <rminnich@chromium.org>
Tested-by: Ronald G. Minnich <rminnich@chromium.org>
Reviewed-on: http://review.coreboot.org/4470
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/cpu/samsung')
-rw-r--r-- | src/cpu/samsung/exynos5420/cpu.c | 21 |
1 files changed, 21 insertions, 0 deletions
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 <ec/google/chromeec/ec.h> + 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(); |