diff options
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/trogdor/Kconfig | 4 | ||||
-rw-r--r-- | src/mainboard/google/trogdor/board.h | 17 | ||||
-rw-r--r-- | src/mainboard/google/trogdor/chromeos.c | 13 | ||||
-rw-r--r-- | src/mainboard/google/trogdor/mainboard.c | 40 |
4 files changed, 68 insertions, 6 deletions
diff --git a/src/mainboard/google/trogdor/Kconfig b/src/mainboard/google/trogdor/Kconfig index 164c05fe3b..88e72dc5ea 100644 --- a/src/mainboard/google/trogdor/Kconfig +++ b/src/mainboard/google/trogdor/Kconfig @@ -14,8 +14,10 @@ config TROGDOR_HAS_BRIDGE_BACKLIGHT config TROGDOR_HAS_MIPI_PANEL bool + default y if BOARD_GOOGLE_MRBLAND + select MIPI_PANEL_AUO_B101UAN08_3 if BOARD_GOOGLE_MRBLAND + select MIPI_PANEL_BOE_TV101WUM_N53 if BOARD_GOOGLE_MRBLAND default n - select MIPI_PANEL_VIS_RM69299 config TROGDOR_HAS_FINGERPRINT bool diff --git a/src/mainboard/google/trogdor/board.h b/src/mainboard/google/trogdor/board.h index 79dafc09e6..19024eb305 100644 --- a/src/mainboard/google/trogdor/board.h +++ b/src/mainboard/google/trogdor/board.h @@ -15,13 +15,28 @@ #define GPIO_AMP_ENABLE GPIO(23) /* Display specific GPIOS */ -#define GPIO_BACKLIGHT_ENABLE GPIO(12) +#define GPIO_BACKLIGHT_ENABLE ((CONFIG(TROGDOR_HAS_MIPI_PANEL)) ? GPIO(85) : GPIO(12)) + +/* MIPI panel specific GPIOs. Only for mipi_panel-enabled devices (e.g. Mrbland). */ +#if CONFIG(TROGDOR_HAS_MIPI_PANEL) +#define GPIO_MIPI_1V8_ENABLE GPIO(86) +#define GPIO_AVDD_LCD_ENABLE GPIO(88) +#define GPIO_AVEE_LCD_ENABLE GPIO(21) +#define GPIO_VDD_RESET_1V8 GPIO(87) +#define GPIO_EDP_BRIDGE_ENABLE dead_code_t(gpio_t) +#define GPIO_EN_PP3300_DX_EDP dead_code_t(gpio_t) +#else +#define GPIO_MIPI_1V8_ENABLE dead_code_t(gpio_t) +#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_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) : \ (CONFIG(BOARD_GOOGLE_COACHZ) && board_id() == 0 ? GPIO(52) : \ (CONFIG(BOARD_GOOGLE_LAZOR) || CONFIG(BOARD_GOOGLE_POMPOM) ? GPIO(30) : \ GPIO(67))))) +#endif /* Fingerprint-specific GPIOs. Only for fingerprint-enabled devices (e.g. CoachZ). */ #if CONFIG(TROGDOR_HAS_FINGERPRINT) diff --git a/src/mainboard/google/trogdor/chromeos.c b/src/mainboard/google/trogdor/chromeos.c index c2183880ce..9006000191 100644 --- a/src/mainboard/google/trogdor/chromeos.c +++ b/src/mainboard/google/trogdor/chromeos.c @@ -12,10 +12,17 @@ void setup_chromeos_gpios(void) 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); - gpio_output(GPIO_EN_PP3300_DX_EDP, 0); - gpio_output(GPIO_EDP_BRIDGE_ENABLE, 0); + + if (CONFIG(TROGDOR_HAS_MIPI_PANEL)) { + gpio_output(GPIO_MIPI_1V8_ENABLE, 0); + gpio_output(GPIO_AVDD_LCD_ENABLE, 0); + gpio_output(GPIO_VDD_RESET_1V8, 0); + gpio_output(GPIO_AVEE_LCD_ENABLE, 0); + } else { + gpio_output(GPIO_EN_PP3300_DX_EDP, 0); + gpio_output(GPIO_EDP_BRIDGE_ENABLE, 0); + } if (CONFIG(TROGDOR_HAS_FINGERPRINT)) { gpio_output(GPIO_FPMCU_BOOT0, 0); diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 066705eb6b..6ef8837879 100644 --- a/src/mainboard/google/trogdor/mainboard.c +++ b/src/mainboard/google/trogdor/mainboard.c @@ -78,9 +78,46 @@ static void power_on_bridge(void) gpio_output(GPIO_EN_PP3300_DX_EDP, 1); } +static void configure_mipi_panel(void) +{ + int panel_id = sku_id() >> 8; + gpio_output(GPIO_MIPI_1V8_ENABLE, 1); + mdelay(5); + gpio_output(GPIO_AVDD_LCD_ENABLE, 1); + mdelay(5); + gpio_output(GPIO_AVEE_LCD_ENABLE, 1); + mdelay(15); + gpio_output(GPIO_VDD_RESET_1V8, 1); + mdelay(15); + /* + * In mrbland, BOE panel_id = 3, it needs 15ms delay and + * do reset again according to spec(See in b/197300876). + */ + if (CONFIG(BOARD_GOOGLE_MRBLAND) && (panel_id == 3)) { + gpio_output(GPIO_VDD_RESET_1V8, 0); + mdelay(5); + gpio_output(GPIO_VDD_RESET_1V8, 1); + } +} + static struct panel_serializable_data *get_mipi_panel(void) { - const char *cbfs_filename = "panel-VIS_RM69299"; + const char *cbfs_filename = NULL; + int panel_id = sku_id() >> 8; + + if (CONFIG(BOARD_GOOGLE_MRBLAND)) { + switch (panel_id) { + case 3: + cbfs_filename = "panel-BOE_TV101WUM_N53"; + break; + case 6: + cbfs_filename = "panel-AUO_B101UAN08_3"; + break; + } + } + + if (!cbfs_filename) + return NULL; struct panel_serializable_data *panel = cbfs_map(cbfs_filename, NULL); if (!panel) { @@ -126,6 +163,7 @@ static void display_startup(void) } if (CONFIG(TROGDOR_HAS_MIPI_PANEL)) { + configure_mipi_panel(); panel = get_mipi_panel(); if (!panel) return; |