mb/google/skywalker: Add panel driver in mainboard

Add panel driver in mainboard for skywalker project.

BUG=b:400886838,b:425272330
BRANCH=none
TEST=check edp training pass and show log:
EQ training pass

Change-Id: I7352a6728237842a6819b7129c61a1d4c7646fcb
Signed-off-by: Bincai Liu <bincai.liu@mediatek.corp-partner.google.com>
Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
Signed-off-by: Vince Liu <vince-wl.liu@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88170
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Vince Liu 2025-06-16 22:43:58 +08:00 committed by Yidi Lin
commit 4ef51ffbd7
4 changed files with 43 additions and 0 deletions

View file

@ -11,4 +11,5 @@ romstage-y += regulator.c
ramstage-y += boardid.c
ramstage-y += mainboard.c
ramstage-y += panel.c
ramstage-y += regulator.c

View file

@ -67,6 +67,12 @@ void fill_lb_gpios(struct lb_gpios *gpios)
};
lb_add_gpios(gpios, alc5645_gpios, ARRAY_SIZE(alc5645_gpios));
}
struct lb_gpio edp_pwm_backlight_gpios[] = {
{GPIO_BL_PWM_1V8.id, ACTIVE_HIGH, -1, "PWM control"},
{GPIO_AP_EDP_BKLTEN.id, ACTIVE_HIGH, -1, "backlight enable"},
};
lb_add_gpios(gpios, edp_pwm_backlight_gpios, ARRAY_SIZE(edp_pwm_backlight_gpios));
}
int cr50_plat_irq_status(void)

View file

@ -35,6 +35,10 @@
#define GPIO_I2SOUT0_BCK GPIO(I2SOUT0_BCK)
#define GPIO_I2SOUT0_LRCK GPIO(I2SOUT0_LRCK)
#define GPIO_I2SOUT0_DOUT GPIO(I2SOUT0_DO)
#define GPIO_BL_PWM_1V8 GPIO(DISP_PWM0)
#define GPIO_AP_EDP_BKLTEN GPIO(GPIO13)
#define GPIO_EN_PP3300_EDP_X GPIO(DSI_LCM_RST)
#define GPIO_EDP_HPD_1V8 GPIO(EDP_TX_HPD)
void setup_chromeos_gpios(void);

View file

@ -0,0 +1,32 @@
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
#include <gpio.h>
#include <soc/display.h>
#include "gpio.h"
/* Set up backlight control pins as output pins, and set them to power off by default */
static void configure_backlight(void)
{
gpio_output(GPIO_AP_EDP_BKLTEN, 0);
gpio_output(GPIO_BL_PWM_1V8, 0);
}
static void power_on_panel(void)
{
gpio_output(GPIO_EN_PP3300_EDP_X, 1);
gpio_set_mode(GPIO_EDP_HPD_1V8, GPIO_FUNC(EDP_TX_HPD, EDP_TX_HPD));
gpio_set_pull(GPIO_EDP_HPD_1V8, GPIO_PULL_DISABLE, GPIO_PULL_UP);
}
static struct panel_description panel = {
.configure_backlight = configure_backlight,
.power_on = power_on_panel,
.disp_path = DISP_PATH_EDP,
.orientation = LB_FB_ORIENTATION_NORMAL,
};
struct panel_description *get_active_panel(void)
{
return &panel;
}