diff options
author | Rex-BC Chen <rex-bc.chen@mediatek.com> | 2023-01-17 11:04:58 +0800 |
---|---|---|
committer | Rex-BC Chen <rex-bc.chen@mediatek.com> | 2023-02-09 09:19:07 +0000 |
commit | d7b7460d6e8a9fbd32c41e91a9d00dc536953310 (patch) | |
tree | 5cbace6ace8a86e761f41bb7f69e55d772ea0909 /src/mainboard/google/geralt/panel_geralt.c | |
parent | 84bb5f4e1958b0fe82991b027ef0f166c109faa2 (diff) |
mb/google/geralt: Add power-on sequence for BOE_TV110C9M_LL0
For Geralt, we use BOE_TV110C9M_LL0 as MIPI firmware display, so add the
power-on sequence for BOE_TV110C9M_LL0.
BUG=b:244208960
TEST=test firmware display pass for BOE_TV110C9M_LL0 on Geralt.
Change-Id: I3ef0b2e26d8cc0dc35c2985363ee4c3557dac8a9
Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Signed-off-by: Liju-Clr Chen <liju-clr.chen@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72749
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/mainboard/google/geralt/panel_geralt.c')
-rw-r--r-- | src/mainboard/google/geralt/panel_geralt.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/mainboard/google/geralt/panel_geralt.c b/src/mainboard/google/geralt/panel_geralt.c index bbb1060137..2991360506 100644 --- a/src/mainboard/google/geralt/panel_geralt.c +++ b/src/mainboard/google/geralt/panel_geralt.c @@ -2,13 +2,21 @@ #include <boardid.h> #include <boot/coreboot_tables.h> +#include <console/console.h> +#include <delay.h> #include <gpio.h> #include <soc/gpio_common.h> +#include <soc/i2c.h> +#include <soc/regulator.h> +#include <soc/pmif.h> #include <string.h> #include "gpio.h" #include "panel.h" +#define PMIC_TPS65132_I2C I2C3 +#define PMIC_TPS65132_SLAVE 0x3E + static void configure_mipi_pwm_backlight(void) { gpio_output(GPIO_AP_DISP_BKLTEN, 0); @@ -22,7 +30,34 @@ static void configure_edp_aux_backlight(void) static void power_on_mipi_boe_tv110c9m_ll0(void) { - /* TODO: Add the poweron for BOE_TV110C9M_LL0 when we get BOE_TV110C9M_LL0 */ + /* Enable VM18V */ + mainboard_enable_regulator(MTK_REGULATOR_VDD18, true); + + /* Initialize I2C3 for PMIC TPS65132 */ + mtk_i2c_bus_init(PMIC_TPS65132_I2C, I2C_SPEED_FAST); + mdelay(10); + + gpio_output(GPIO_DISP_RST_1V8_L, 0); + mdelay(1); + + gpio_output(GPIO_EN_PPVAR_MIPI_DISP, 1); + gpio_output(GPIO_EN_PPVAR_MIPI_DISP_150MA, 1); + mdelay(10); + + /* Set AVDD = 5.7V */ + if (panel_pmic_reg_mask(PMIC_TPS65132_I2C, PMIC_TPS65132_SLAVE, 0x00, 0x11, 0x1F) < 0) + return; + + /* Set AVEE = -5.7V */ + if (panel_pmic_reg_mask(PMIC_TPS65132_I2C, PMIC_TPS65132_SLAVE, 0x01, 0x11, 0x1F) < 0) + return; + + gpio_output(GPIO_DISP_RST_1V8_L, 1); + mdelay(1); + gpio_output(GPIO_DISP_RST_1V8_L, 0); + mdelay(1); + gpio_output(GPIO_DISP_RST_1V8_L, 1); + mdelay(6); } static void power_on_edp_mutto_b152731e1(void) |