zanxi chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59044 )
Change subject: mb/google/trogdor: Adjust mipi panel backlight gpio ......................................................................
mb/google/trogdor: Adjust mipi panel backlight gpio
According hareware design of mrbland and wormdingler, GPIO(12) not only controls EDP panel backlight, mipi panel backlight also depends on the pin. Meanwhile, TP_EN(GPIO 85) need pull up before AP_BKLTEN(GPIO12) up.
BUG=b:197709288,b:199081803,b:205166230 BRANCH=trogdor TEST=emerge-strongbad coreboot
Change-Id: Ie9920e5366f6b1ea9e0da228bd211317516b390a --- M src/mainboard/google/trogdor/board.h M src/mainboard/google/trogdor/chromeos.c M src/mainboard/google/trogdor/mainboard.c 3 files changed, 11 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/59044/1
diff --git a/src/mainboard/google/trogdor/board.h b/src/mainboard/google/trogdor/board.h index 208cafc..a8ee322 100644 --- a/src/mainboard/google/trogdor/board.h +++ b/src/mainboard/google/trogdor/board.h @@ -13,9 +13,11 @@ #define GPIO_H1_AP_INT (CONFIG(TROGDOR_REV0) ? GPIO(21) : GPIO(42)) #define GPIO_SD_CD_L GPIO(69) #define GPIO_AMP_ENABLE GPIO(23) +#define GPIO_TP_EN GPIO(85)
/* Display specific GPIOS */ -#define GPIO_BACKLIGHT_ENABLE ((CONFIG(TROGDOR_HAS_MIPI_PANEL)) ? GPIO(85) : GPIO(12)) +#define GPIO_BACKLIGHT_ENABLE GPIO(12) +
/* MIPI panel specific GPIOs. Only for mipi_panel-enabled devices (e.g. Mrbland). */ #if CONFIG(TROGDOR_HAS_MIPI_PANEL) diff --git a/src/mainboard/google/trogdor/chromeos.c b/src/mainboard/google/trogdor/chromeos.c index 9006000..e9b86e9 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_TP_EN, 0); gpio_output(GPIO_BACKLIGHT_ENABLE, 0);
if (CONFIG(TROGDOR_HAS_MIPI_PANEL)) { diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 1a60131..a0a8313 100644 --- a/src/mainboard/google/trogdor/mainboard.c +++ b/src/mainboard/google/trogdor/mainboard.c @@ -138,6 +138,13 @@ mdelay(5); gpio_output(GPIO_VDD_RESET_1V8, 1); } + /* + * In mrbland and wormdingler, TP_EN(GPIO 85) need pull up + * before GPIO_BACKLIGHT_ENABLE(GPIO12) up. + */ + if (CONFIG(BOARD_GOOGLE_MRBLAND) || CONFIG(BOARD_GOOGLE_WORMDINGLER)) { + gpio_output(GPIO_TP_EN, 1); + } }
static struct panel_serializable_data *get_mipi_panel(enum lb_fb_orientation *orientation)