Julius Werner has uploaded this change for review.

View Change

trogdor: Initialize BACKLIGHT_ENABLE to 0, only turn it on in payload

The BACKLIGHT_ENABLE pin on this board unfortunately defaults to a
pull-up on power on, meaning the backlight is immediately enabled. Best
we can do about that is to turn it off again early and wait until it is
actually correct in the panel power sequence to turn it back on.

Some panels want an explicit 80ms delay after training the eDP
connection before the backlight is turned on (this is probably just to
avoid temporary display artifacts, but whatever). We don't want to
busy-wait that extra time, so instead just delegate turning on that GPIO
to the payload (which is also in charge of the backlight PWM already).

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Id8dafbdcb40175fbc9205276eee698583b971873
---
M src/mainboard/google/trogdor/chromeos.c
M src/mainboard/google/trogdor/mainboard.c
2 files changed, 3 insertions(+), 3 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/49495/1
diff --git a/src/mainboard/google/trogdor/chromeos.c b/src/mainboard/google/trogdor/chromeos.c
index 989bf69..e93432f 100644
--- a/src/mainboard/google/trogdor/chromeos.c
+++ b/src/mainboard/google/trogdor/chromeos.c
@@ -12,6 +12,7 @@
gpio_input_pullup(GPIO_SD_CD_L);
gpio_input_irq(GPIO_H1_AP_INT, IRQ_TYPE_RISING_EDGE, GPIO_PULL_UP);
gpio_output(GPIO_AMP_ENABLE, 0);
+ gpio_output(GPIO_BACKLIGHT_ENABLE, 0);
}

void fill_lb_gpios(struct lb_gpios *gpios)
@@ -27,6 +28,8 @@
"SD card detect"},
{GPIO_AMP_ENABLE.addr, ACTIVE_HIGH, gpio_get(GPIO_AMP_ENABLE),
"speaker enable"},
+ {GPIO_BACKLIGHT_ENABLE.addr, ACTIVE_HIGH,
+ gpio_get(GPIO_BACKLIGHT_ENABLE), "backlight"},
};

lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c
index 0f469e0..7465c63 100644
--- a/src/mainboard/google/trogdor/mainboard.c
+++ b/src/mainboard/google/trogdor/mainboard.c
@@ -102,9 +102,6 @@
return;

printk(BIOS_INFO, "display init!\n");
-
- /* Configure backlight */
- gpio_output(GPIO_BACKLIGHT_ENABLE, 1);
display_init(&ed);
fb_new_framebuffer_info_from_edid(&ed, (uintptr_t)0);
} else

To view, visit change 49495. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id8dafbdcb40175fbc9205276eee698583b971873
Gerrit-Change-Number: 49495
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner@chromium.org>
Gerrit-MessageType: newchange