Attention is currently required from: Hung-Te Lin, Yidi Lin, Yu-Ping Wu.
Yang Wu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81585?usp=email )
Change subject: mb/google/corsola: Enable the MIPI panel KD_KD101NE3_40TI for Wugtrio ......................................................................
mb/google/corsola: Enable the MIPI panel KD_KD101NE3_40TI for Wugtrio
Enable the MIPI panel KD_KD101NE3_40TI for Wugtrio.
BUG=b:331870701 TEST=emerge-staryu coreboot chromeos-bootimage and display normally BRANCH=Corsola
Change-Id: I586de68da4d0ee2dd5b7baea92ebb06db9fcfe8b Signed-off-by: Yang Wu wuyang5@huaqin.corp-partner.google.com --- M src/mainboard/google/corsola/Kconfig M src/mainboard/google/corsola/Makefile.mk A src/mainboard/google/corsola/panel_wugtrio.c 3 files changed, 56 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/81585/1
diff --git a/src/mainboard/google/corsola/Kconfig b/src/mainboard/google/corsola/Kconfig index d5386ae..fb2e0e7 100644 --- a/src/mainboard/google/corsola/Kconfig +++ b/src/mainboard/google/corsola/Kconfig @@ -18,16 +18,16 @@ BOARD_GOOGLE_TENTACRUEL
config BOARD_GOOGLE_STARYU_COMMON - def_bool BOARD_GOOGLE_STARMIE - select MIPI_PANEL_STA_HIMAX83102_J02 - select MIPI_PANEL_STA_ILI9882T + def_bool BOARD_GOOGLE_STARMIE || \ + BOARD_GOOGLE_WUGTRIO
if BOARD_GOOGLE_CORSOLA_COMMON
config CORSOLA_SDCARD_INIT def_bool BOARD_GOOGLE_MAGIKARP || \ BOARD_GOOGLE_TENTACRUEL || \ - BOARD_GOOGLE_KINGLER_COMMON + BOARD_GOOGLE_KINGLER_COMMON || \ + BOARD_GOOGLE_WUGTRIO
config BOARD_SPECIFIC_OPTIONS def_bool y @@ -61,6 +61,9 @@ select RTC select FW_CONFIG select FW_CONFIG_SOURCE_CHROMEEC_CBI + select MIPI_PANEL_KD_KD101NE3_40TI if BOARD_GOOGLE_WUGTRIO + select MIPI_PANEL_STA_HIMAX83102_J02 if BOARD_GOOGLE_STARMIE + select MIPI_PANEL_STA_ILI9882T if BOARD_GOOGLE_STARMIE
config VBOOT select EC_GOOGLE_CHROMEEC_SWITCHES diff --git a/src/mainboard/google/corsola/Makefile.mk b/src/mainboard/google/corsola/Makefile.mk index 1442f33..818065a 100644 --- a/src/mainboard/google/corsola/Makefile.mk +++ b/src/mainboard/google/corsola/Makefile.mk @@ -26,3 +26,5 @@ ramstage-y += reset.c
ramstage-$(CONFIG_BOARD_GOOGLE_STARMIE) += panel_starmie.c + +ramstage-$(CONFIG_BOARD_GOOGLE_WUGTRIO) += panel_wugtrio.c diff --git a/src/mainboard/google/corsola/panel_wugtrio.c b/src/mainboard/google/corsola/panel_wugtrio.c new file mode 100644 index 0000000..bd0fe9f --- /dev/null +++ b/src/mainboard/google/corsola/panel_wugtrio.c @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <delay.h> +#include <gpio.h> +#include <soc/regulator.h> + +#include "gpio.h" +#include "panel.h" + +static void mipi_panel_power_on(void) +{ + mainboard_set_regulator_voltage(MTK_REGULATOR_VIO18, 1800000); + udelay(100); + + mainboard_set_regulator_voltage(MTK_REGULATOR_VCN33, 3300000); + + gpio_output(GPIO_EN_PP3300_DISP_X, 1); + mdelay(5); + + /* DISP_RST_1V8_L */ + gpio_output(GPIO_EDPBRDG_RST_L, 1); + mdelay(15); + gpio_output(GPIO_EDPBRDG_RST_L, 0); + udelay(20); + gpio_output(GPIO_EDPBRDG_RST_L, 1); +} + +static struct panel_description wugtrio_panels[] = { + /* KingDisplay panel with bias IC on it */ + [4] = { + .configure_backlight = backlight_control, + .power_on = mipi_panel_power_on, + .name = "KD_KD101NE3_40TI", + .disp_path = DISP_PATH_MIPI, + .orientation = LB_FB_ORIENTATION_LEFT_UP, + }, +}; + +struct panel_description *get_panel_description(void) +{ + uint32_t id = panel_id() & 0xF; + if (id >= ARRAY_SIZE(wugtrio_panels)) + return NULL; + + return &wugtrio_panels[id]; +}