mb/google/geralt: Enable BOE_NV110WUM_L60 panel for Ciri
The MIPI panel BOE_NV110WUM_L60 will be used for Ciri, enable it. Also remove the `mdelay(10)` after mtk_i2c_bus_init, because MTK confirms this is not needed. Add mdelay(2) between VDD18 and VSP/VSN to meet the panel datasheet. BUG=b:308968270 TEST=Boot to firmware screen BRANCH=None Change-Id: I0a04f062f81c543d38716d7ff185b5633c1aa3a9 Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78957 Reviewed-by: Yidi Lin <yidilin@google.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Martin L Roth
parent
d7612e9765
commit
d4b6b81280
@@ -42,6 +42,7 @@ config BOARD_SPECIFIC_OPTIONS
|
|||||||
select HAVE_LINEAR_FRAMEBUFFER
|
select HAVE_LINEAR_FRAMEBUFFER
|
||||||
select RTC
|
select RTC
|
||||||
select MIPI_PANEL_BOE_TV110C9M_LL0 if BOARD_GOOGLE_GERALT
|
select MIPI_PANEL_BOE_TV110C9M_LL0 if BOARD_GOOGLE_GERALT
|
||||||
|
select MIPI_PANEL_BOE_NV110WUM_L60 if BOARD_GOOGLE_CIRI
|
||||||
select FW_CONFIG
|
select FW_CONFIG
|
||||||
select FW_CONFIG_SOURCE_CHROMEEC_CBI
|
select FW_CONFIG_SOURCE_CHROMEEC_CBI
|
||||||
|
|
||||||
|
@@ -24,4 +24,5 @@ ramstage-y += mainboard.c
|
|||||||
ramstage-y += panel.c
|
ramstage-y += panel.c
|
||||||
ramstage-y += regulator.c
|
ramstage-y += regulator.c
|
||||||
ramstage-y += reset.c
|
ramstage-y += reset.c
|
||||||
|
ramstage-$(CONFIG_BOARD_GOOGLE_CIRI) += panel_ciri.c
|
||||||
ramstage-$(CONFIG_BOARD_GOOGLE_GERALT) += panel_geralt.c
|
ramstage-$(CONFIG_BOARD_GOOGLE_GERALT) += panel_geralt.c
|
||||||
|
@@ -3,10 +3,14 @@
|
|||||||
#include <boardid.h>
|
#include <boardid.h>
|
||||||
#include <cbfs.h>
|
#include <cbfs.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
|
#include <delay.h>
|
||||||
#include <edid.h>
|
#include <edid.h>
|
||||||
#include <gpio.h>
|
#include <gpio.h>
|
||||||
#include <identity.h>
|
#include <identity.h>
|
||||||
#include <soc/gpio_common.h>
|
#include <soc/gpio_common.h>
|
||||||
|
#include <soc/i2c.h>
|
||||||
|
#include <soc/pmif.h>
|
||||||
|
#include <soc/regulator.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
@@ -59,3 +63,22 @@ void fill_lp_backlight_gpios(struct lb_gpios *gpios)
|
|||||||
|
|
||||||
lb_add_gpios(gpios, backlight_gpios, ARRAY_SIZE(backlight_gpios));
|
lb_add_gpios(gpios, backlight_gpios, ARRAY_SIZE(backlight_gpios));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void power_on_mipi_panel(const struct tps65132s_cfg *cfg)
|
||||||
|
{
|
||||||
|
mtk_i2c_bus_init(cfg->i2c_bus, I2C_SPEED_FAST);
|
||||||
|
|
||||||
|
/* Enable VM18V */
|
||||||
|
mainboard_enable_regulator(MTK_REGULATOR_VDD18, true);
|
||||||
|
mdelay(2);
|
||||||
|
if (tps65132s_setup(cfg) != CB_SUCCESS)
|
||||||
|
printk(BIOS_ERR, "Failed to set up voltage regulator tps65132s\n");
|
||||||
|
gpio_output(GPIO_DISP_RST_1V8_L, 0);
|
||||||
|
mdelay(1);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
@@ -4,9 +4,11 @@
|
|||||||
#define __MAINBOARD_GOOGLE_GERALT_PANEL_H__
|
#define __MAINBOARD_GOOGLE_GERALT_PANEL_H__
|
||||||
|
|
||||||
#include <soc/display.h>
|
#include <soc/display.h>
|
||||||
|
#include <soc/tps65132s.h>
|
||||||
|
|
||||||
void configure_mipi_pwm_backlight(void);
|
void configure_mipi_pwm_backlight(void);
|
||||||
void fill_lp_backlight_gpios(struct lb_gpios *gpios);
|
void fill_lp_backlight_gpios(struct lb_gpios *gpios);
|
||||||
|
void power_on_mipi_panel(const struct tps65132s_cfg *cfg);
|
||||||
uint32_t panel_id(void);
|
uint32_t panel_id(void);
|
||||||
struct panel_description *get_panel_description(uint32_t panel_id);
|
struct panel_description *get_panel_description(uint32_t panel_id);
|
||||||
|
|
||||||
|
48
src/mainboard/google/geralt/panel_ciri.c
Normal file
48
src/mainboard/google/geralt/panel_ciri.c
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <console/console.h>
|
||||||
|
#include <soc/i2c.h>
|
||||||
|
|
||||||
|
#include "gpio.h"
|
||||||
|
#include "panel.h"
|
||||||
|
|
||||||
|
#define PMIC_TPS65132_I2C I2C3
|
||||||
|
|
||||||
|
static void power_on_mipi_himax_83102j(void)
|
||||||
|
{
|
||||||
|
const struct tps65132s_reg_setting reg_settings[] = {
|
||||||
|
{ PMIC_TPS65132_VPOS, 0x11, 0x1f },
|
||||||
|
{ PMIC_TPS65132_VNEG, 0x11, 0x1f },
|
||||||
|
{ PMIC_TPS65132_DLYX, 0x55, 0xff },
|
||||||
|
{ PMIC_TPS65132_ASSDD, 0x5b, 0xff },
|
||||||
|
};
|
||||||
|
const struct tps65132s_cfg cfg = {
|
||||||
|
.i2c_bus = PMIC_TPS65132_I2C,
|
||||||
|
.en = GPIO_EN_PPVAR_MIPI_DISP,
|
||||||
|
.sync = GPIO_EN_PPVAR_MIPI_DISP_150MA,
|
||||||
|
.settings = reg_settings,
|
||||||
|
.setting_counts = ARRAY_SIZE(reg_settings),
|
||||||
|
};
|
||||||
|
power_on_mipi_panel(&cfg);
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct panel_description ciri_panels[] = {
|
||||||
|
[17] = {
|
||||||
|
.name = "BOE_NV110WUM_L60",
|
||||||
|
.power_on = power_on_mipi_himax_83102j,
|
||||||
|
.configure_backlight = configure_mipi_pwm_backlight,
|
||||||
|
.orientation = LB_FB_ORIENTATION_LEFT_UP,
|
||||||
|
.disp_path = DISP_PATH_MIPI,
|
||||||
|
.pwm_ctrl_gpio = true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
struct panel_description *get_panel_description(uint32_t panel_id)
|
||||||
|
{
|
||||||
|
uint32_t id = panel_id & 0xFF;
|
||||||
|
|
||||||
|
if (id >= ARRAY_SIZE(ciri_panels))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return &ciri_panels[id];
|
||||||
|
}
|
@@ -1,15 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
#include <boardid.h>
|
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <delay.h>
|
|
||||||
#include <gpio.h>
|
|
||||||
#include <soc/gpio_common.h>
|
|
||||||
#include <soc/i2c.h>
|
#include <soc/i2c.h>
|
||||||
#include <soc/regulator.h>
|
|
||||||
#include <soc/tps65132s.h>
|
|
||||||
#include <soc/pmif.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
#include "panel.h"
|
#include "panel.h"
|
||||||
@@ -31,21 +23,7 @@ static void power_on_mipi_boe_tv110c9m_ll0(void)
|
|||||||
.settings = reg_settings,
|
.settings = reg_settings,
|
||||||
.setting_counts = ARRAY_SIZE(reg_settings),
|
.setting_counts = ARRAY_SIZE(reg_settings),
|
||||||
};
|
};
|
||||||
|
power_on_mipi_panel(&cfg);
|
||||||
/* Enable VM18V */
|
|
||||||
mainboard_enable_regulator(MTK_REGULATOR_VDD18, true);
|
|
||||||
mtk_i2c_bus_init(PMIC_TPS65132_I2C, I2C_SPEED_FAST);
|
|
||||||
mdelay(10);
|
|
||||||
if (tps65132s_setup(&cfg) != CB_SUCCESS)
|
|
||||||
printk(BIOS_ERR, "Failed to set up voltage regulator tps65132s\n");
|
|
||||||
gpio_output(GPIO_DISP_RST_1V8_L, 0);
|
|
||||||
mdelay(1);
|
|
||||||
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 struct panel_description panels[] = {
|
static struct panel_description panels[] = {
|
||||||
|
Reference in New Issue
Block a user