diff options
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/corsola/Kconfig | 8 | ||||
-rw-r--r-- | src/mainboard/google/corsola/Kconfig.name | 3 | ||||
-rw-r--r-- | src/mainboard/google/corsola/Makefile.mk | 1 | ||||
-rw-r--r-- | src/mainboard/google/corsola/panel_wugtrio.c | 46 |
4 files changed, 56 insertions, 2 deletions
diff --git a/src/mainboard/google/corsola/Kconfig b/src/mainboard/google/corsola/Kconfig index 903dc68ae7..ddc84ae7c3 100644 --- a/src/mainboard/google/corsola/Kconfig +++ b/src/mainboard/google/corsola/Kconfig @@ -19,14 +19,16 @@ config BOARD_GOOGLE_KRABBY_COMMON BOARD_GOOGLE_TENTACRUEL config BOARD_GOOGLE_STARYU_COMMON - def_bool BOARD_GOOGLE_STARMIE + 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 +63,7 @@ config BOARD_SPECIFIC_OPTIONS 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 @@ -84,6 +87,7 @@ config MAINBOARD_PART_NUMBER default "Starmie" if BOARD_GOOGLE_STARMIE default "Ponyta" if BOARD_GOOGLE_PONYTA default "Chinchou" if BOARD_GOOGLE_CHINCHOU + default "Wugtrio" if BOARD_GOOGLE_WUGTRIO config BOOT_DEVICE_SPI_FLASH_BUS int diff --git a/src/mainboard/google/corsola/Kconfig.name b/src/mainboard/google/corsola/Kconfig.name index 17fc65d7ec..af21979cc7 100644 --- a/src/mainboard/google/corsola/Kconfig.name +++ b/src/mainboard/google/corsola/Kconfig.name @@ -35,3 +35,6 @@ comment "Staryu" config BOARD_GOOGLE_STARMIE bool "-> Starmie" + +config BOARD_GOOGLE_WUGTRIO + bool "-> Wugtrio" diff --git a/src/mainboard/google/corsola/Makefile.mk b/src/mainboard/google/corsola/Makefile.mk index 1442f33d6a..09e9b91758 100644 --- a/src/mainboard/google/corsola/Makefile.mk +++ b/src/mainboard/google/corsola/Makefile.mk @@ -26,3 +26,4 @@ ramstage-y += regulator.c 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 0000000000..3405c0dcae --- /dev/null +++ b/src/mainboard/google/corsola/panel_wugtrio.c @@ -0,0 +1,46 @@ +/* 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[] = { + /* K&D Technology 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]; +} |