summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorZanxi Chen <chenzanxi@huaqin.corp-partner.google.com>2021-11-09 19:49:10 +0800
committerJulius Werner <jwerner@chromium.org>2021-11-17 18:50:37 +0000
commite1095496e1f2e2284f51a89a46083e932d6dc24f (patch)
tree1ed00d41341d74f32eb705870e689c0180b88808 /src/mainboard
parent0087de817a89a8be5ceb6333289e96d59d0650c5 (diff)
mb/google/trogdor: Adjust mipi panel backlight gpio
According hareware design, mipi panel backlight relies on AP_BKLTEN(GPIO_12) and TP_EN(GPIO_85). Meanwhile, TP_EN(GPIO_85) needs pull up to enable PP3300_DISP_ON before AP_BKLTEN(GPIO_12) up. BUG=b:197709288,b:199081803,b:205166230 BRANCH=trogdor TEST=emerge-strongbad coreboot Change-Id: Ie9920e5366f6b1ea9e0da228bd211317516b390a Signed-off-by: Zanxi Chen <chenzanxi@huaqin.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/59044 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/trogdor/board.h4
-rw-r--r--src/mainboard/google/trogdor/mainboard.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/src/mainboard/google/trogdor/board.h b/src/mainboard/google/trogdor/board.h
index 208cafc4da..534cfe9e12 100644
--- a/src/mainboard/google/trogdor/board.h
+++ b/src/mainboard/google/trogdor/board.h
@@ -15,7 +15,7 @@
#define GPIO_AMP_ENABLE GPIO(23)
/* 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)
@@ -23,6 +23,7 @@
#define GPIO_AVDD_LCD_ENABLE GPIO(88)
#define GPIO_AVEE_LCD_ENABLE GPIO(21)
#define GPIO_VDD_RESET_1V8 GPIO(87)
+#define GPIO_TP_EN GPIO(85)
#define GPIO_EDP_BRIDGE_ENABLE dead_code_t(gpio_t)
#define GPIO_EN_PP3300_DX_EDP dead_code_t(gpio_t)
#define GPIO_PS8640_EDP_BRIDGE_PD_L dead_code_t(gpio_t)
@@ -33,6 +34,7 @@
#define GPIO_AVDD_LCD_ENABLE dead_code_t(gpio_t)
#define GPIO_AVEE_LCD_ENABLE dead_code_t(gpio_t)
#define GPIO_VDD_RESET_1V8 dead_code_t(gpio_t)
+#define GPIO_TP_EN dead_code_t(gpio_t)
#define GPIO_EDP_BRIDGE_ENABLE (CONFIG(TROGDOR_REV0) ? GPIO(14) : GPIO(104))
#define GPIO_EN_PP3300_DX_EDP (CONFIG(TROGDOR_REV0) ? GPIO(106) : \
(CONFIG(BOARD_GOOGLE_TROGDOR) && board_id() == 1 ? GPIO(30) : \
diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c
index 2a2fa94235..cfc811d051 100644
--- a/src/mainboard/google/trogdor/mainboard.c
+++ b/src/mainboard/google/trogdor/mainboard.c
@@ -145,6 +145,12 @@ static void configure_mipi_panel(void)
mdelay(5);
gpio_output(GPIO_VDD_RESET_1V8, 1);
}
+ /*
+ * In mipi panel, TP_EN(GPIO 85) need pull up before
+ * GPIO_BACKLIGHT_ENABLE(GPIO12) up.
+ */
+ if (CONFIG(TROGDOR_HAS_MIPI_PANEL))
+ gpio_output(GPIO_TP_EN, 1);
}
static struct panel_serializable_data *get_mipi_panel(enum lb_fb_orientation *orientation)