mb/google/rauru: Support new bias IC TPS65130RGER
The panel uses TPS65130RGER as the bias IC, with supply set to ±5.9V. Configure TPS65130RGER initialization and power-on sequence according to the tps65130.pdf. The tps65132s driver is no longer used on this platform and remove it from the build. [INFO ] mtk_display_init: 'BOE NS130069' 3504x2190@120Hz bpp 4 BUG=b:463911061 TEST=Check display initialization log and display are normal BRANCH=none Change-Id: Idfc19597c4357adb818ca008f93bac2e7ebe3edb Signed-off-by: Wentao Qin <qinwentao@huaqin.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91424 Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
parent
5d6061d0ba
commit
0be563503a
5 changed files with 15 additions and 59 deletions
|
|
@ -11,7 +11,6 @@ romstage-y += romstage.c
|
|||
ramstage-y += boardid.c
|
||||
ramstage-y += mainboard.c
|
||||
ramstage-y += panel.c
|
||||
ramstage-y += panel_tps65132s.c
|
||||
ramstage-y += regulator.c
|
||||
|
||||
ramstage-$(CONFIG_BOARD_GOOGLE_SAPPHIRE) += panel_sapphire.c
|
||||
|
|
|
|||
|
|
@ -3,22 +3,10 @@
|
|||
#ifndef __MAINBOARD_GOOGLE_RAURU_PANEL_H__
|
||||
#define __MAINBOARD_GOOGLE_RAURU_PANEL_H__
|
||||
|
||||
#include <gpio.h>
|
||||
#include <soc/display.h>
|
||||
#include <soc/i2c.h>
|
||||
#include <soc/tps65132s.h>
|
||||
|
||||
#define PMIC_TRS65132S_SLAVE 0x3e
|
||||
#define PMIC_I2C_BUS I2C7
|
||||
|
||||
struct tps65132s_config {
|
||||
uint32_t i2c_bus;
|
||||
gpio_t en;
|
||||
};
|
||||
|
||||
uint32_t panel_id(void);
|
||||
void configure_backlight(bool enable);
|
||||
void tps65132s_power_on(struct tps65132s_cfg *config);
|
||||
|
||||
/* Return the MIPI panel description */
|
||||
struct panel_description *get_panel_description(void);
|
||||
|
|
|
|||
|
|
@ -1,19 +1,27 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <console/console.h>
|
||||
#include <soc/tps65132s.h>
|
||||
#include <delay.h>
|
||||
#include <gpio.h>
|
||||
#include <soc/mt6363.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "panel.h"
|
||||
|
||||
static void mipi_panel_power_on(void)
|
||||
{
|
||||
struct tps65132s_cfg config = {
|
||||
.i2c_bus = PMIC_I2C_BUS,
|
||||
.en = GPIO_EN_PP3300_EDP_X,
|
||||
.sync = GPIO_EN_PPVAR_MIPI_DISP,
|
||||
};
|
||||
tps65132s_power_on(&config);
|
||||
mt6363_enable_vrf18(true); /* VDD */
|
||||
mdelay(3); /* tsVSP */
|
||||
gpio_output(GPIO_EN_PP3300_EDP_X, 1); /* AVDD */
|
||||
mdelay(2); /* tPON1 */
|
||||
gpio_output(GPIO_EN_PPVAR_MIPI_DISP, 1); /* AVEE */
|
||||
mdelay(2);
|
||||
mdelay(10); /* tRW */
|
||||
gpio_output(GPIO_LCM_RST_1V8_L, 1); /* RESX */
|
||||
mdelay(5);
|
||||
gpio_output(GPIO_LCM_RST_1V8_L, 0);
|
||||
mdelay(5);
|
||||
gpio_output(GPIO_LCM_RST_1V8_L, 1);
|
||||
}
|
||||
|
||||
static struct panel_description sapphire_panels[] = {
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
/* 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 <soc/mt6363.h>
|
||||
|
||||
#include "gpio.h"
|
||||
#include "panel.h"
|
||||
|
||||
void tps65132s_power_on(struct tps65132s_cfg *config)
|
||||
{
|
||||
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 },
|
||||
};
|
||||
|
||||
mt6363_enable_vrf18(true);
|
||||
config->settings = reg_settings;
|
||||
config->setting_counts = ARRAY_SIZE(reg_settings);
|
||||
|
||||
mtk_i2c_bus_init(config->i2c_bus, I2C_SPEED_FAST);
|
||||
|
||||
if (tps65132s_setup(config) != CB_SUCCESS)
|
||||
printk(BIOS_ERR, "Failed to set up tps65132s\n");
|
||||
|
||||
/* DISP_RST_1V8_L */
|
||||
mdelay(10);
|
||||
gpio_output(GPIO_LCM_RST_1V8_L, 1);
|
||||
mdelay(10);
|
||||
gpio_output(GPIO_LCM_RST_1V8_L, 0);
|
||||
mdelay(10);
|
||||
gpio_output(GPIO_LCM_RST_1V8_L, 1);
|
||||
}
|
||||
|
|
@ -90,7 +90,6 @@ ramstage-y += ../common/pmif_clk.c pmif_clk.c
|
|||
ramstage-y += ../common/pmif.c pmif_init.c
|
||||
ramstage-y += ../common/pmif_spmi_v2.c pmif_spmi.c
|
||||
ramstage-y += ../common/rtc.c ../common/rtc_osc_init.c
|
||||
ramstage-y += ../common/tps65132s.c
|
||||
ramstage-y += ../common/usb.c usb.c
|
||||
|
||||
BL31_MAKEARGS += PLAT=mt8196
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue