Yu-Ping Wu has submitted this change. ( https://review.coreboot.org/c/coreboot/+/81585?usp=email )
Change subject: mb/google/corsola: Add new board variant Wugtrio ......................................................................
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 --- M src/mainboard/google/corsola/Kconfig M src/mainboard/google/corsola/Kconfig.name M src/mainboard/google/corsola/Makefile.mk A src/mainboard/google/corsola/panel_wugtrio.c 4 files changed, 56 insertions(+), 2 deletions(-)
Approvals: Yu-Ping Wu: Looks good to me, approved Varshit Pandya: Looks good to me, but someone else must approve build bot (Jenkins): Verified Yidi Lin: Looks good to me, but someone else must approve
diff --git a/src/mainboard/google/corsola/Kconfig b/src/mainboard/google/corsola/Kconfig index 903dc68..ddc84ae 100644 --- a/src/mainboard/google/corsola/Kconfig +++ b/src/mainboard/google/corsola/Kconfig @@ -19,14 +19,16 @@ 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 @@ 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 @@ 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 17fc65d..af21979 100644 --- a/src/mainboard/google/corsola/Kconfig.name +++ b/src/mainboard/google/corsola/Kconfig.name @@ -35,3 +35,6 @@
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 1442f33..09e9b91 100644 --- a/src/mainboard/google/corsola/Makefile.mk +++ b/src/mainboard/google/corsola/Makefile.mk @@ -26,3 +26,4 @@ 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..3405c0d --- /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]; +}