diff options
author | Yang Wu <wuyang5@huaqin.corp-partner.google.com> | 2024-03-29 18:08:04 +0800 |
---|---|---|
committer | Yu-Ping Wu <yupingso@google.com> | 2024-04-03 06:45:25 +0000 |
commit | 9ab5ae76436ee0d20076a4bccbb8c856bf09da1d (patch) | |
tree | 9be5408f681b7b66dfe9eafde7fd09c95bae67f4 /src | |
parent | d0e3ffaaccf5cbde728482f342ef949f9b777eba (diff) |
mb/google/corsola: Add new board variant Wugtrio
Add a new Staryu follower device 'Wugtrio'. And also enables SD card
support and MIPI panel support.
BUG=b:331870701
TEST=emerge-staryu coreboot chromeos-bootimage
BRANCH=corsola
Change-Id: I586de68da4d0ee2dd5b7baea92ebb06db9fcfe8b
Signed-off-by: Yang Wu <wuyang5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81585
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-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]; +} |