diff options
author | Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com> | 2023-05-16 17:30:23 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-06-01 13:09:40 +0000 |
commit | e811c9a44d04bec211f111f73e47f4d3be9d2117 (patch) | |
tree | 866a5aeaebb786bbc7cd6c52aae9a13a7daecdf9 /src/mainboard/google/corsola/panel_starmie.c | |
parent | 44b60eb503778c1a39785963006112aa6cfc8ddd (diff) | |
download | coreboot-e811c9a44d04bec211f111f73e47f4d3be9d2117.tar.gz coreboot-e811c9a44d04bec211f111f73e47f4d3be9d2117.tar.bz2 coreboot-e811c9a44d04bec211f111f73e47f4d3be9d2117.zip |
mb/google/corsola: Fix MIPI panel power on/off sequence
Based on the power sequence of the panel [1] and PMIC datasheet [2],
the power on T2 sequence VSP to VSN should be large than 1ms, but it's
-159us now, and the power off T2 sequence VSP to VSN should be large
than 0ms, but it's less than 0 now. Let's modify the power sequence
to meet the datasheet requirement.
[1] HX83102-J02_Datasheet_v03.pdf
[2] TPS65132-Single-Inductor-Dual-Output-Power-Supply.pdf
BUG=b:282902297
TEST=power sequence T2 pass
Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com>
Change-Id: Ib1625c6a211f849071393f69eaf5c649a8e7f72e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75298
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/corsola/panel_starmie.c')
-rw-r--r-- | src/mainboard/google/corsola/panel_starmie.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/mainboard/google/corsola/panel_starmie.c b/src/mainboard/google/corsola/panel_starmie.c index ffb7b65cd23a..aadabf41197f 100644 --- a/src/mainboard/google/corsola/panel_starmie.c +++ b/src/mainboard/google/corsola/panel_starmie.c @@ -1,20 +1,34 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <console/console.h> #include <delay.h> #include <gpio.h> #include <soc/regulator.h> +#include <soc/tps65132s.h> #include "display.h" #include "gpio.h" static void mipi_panel_power_on(void) { - tps65132s_program_eeprom(); + const struct tps65132s_reg_setting reg_settings[] = { + { PMIC_TPS65132_VPOS, 0x14, 0x1F }, + { PMIC_TPS65132_VNEG, 0x14, 0x1F }, + { PMIC_TPS65132_DLYX, 0x95, 0xFF }, + { PMIC_TPS65132_ASSDD, 0x5b, 0xFF }, + }; + const struct tps65132s_cfg cfg = { + .i2c_bus = PMIC_TPS65132_I2C, + .en = GPIO_EN_PP3300_DISP_X, + .sync = GPIO_EN_PP3300_SDBRDG_X, + .settings = reg_settings, + .setting_counts = ARRAY_SIZE(reg_settings), + }; + mainboard_set_regulator_voltage(MTK_REGULATOR_VIO18, 1800000); - mdelay(1); - gpio_output(GPIO_EN_PP3300_DISP_X, 1); - gpio_output(GPIO_EN_PP3300_SDBRDG_X, 1); - mdelay(1); + if (tps65132s_setup(&cfg) != CB_SUCCESS) + printk(BIOS_ERR, "Failed to setup tps65132s\n"); + /* DISP_RST_1V8_L */ gpio_output(GPIO_EDPBRDG_RST_L, 1); mdelay(1); |