mb/google/kukui: Support panels using ANX7625
For Kukui followers using ANX7625 eDP bridge to access panel. BUG=b:140132295 TEST=make # board = kukui Change-Id: I7dc9c68d076fd0ba4e963cde9414d25c17b332cb Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36767 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
40d816e964
commit
8eef3bf3ca
@ -42,6 +42,7 @@ config BOARD_SPECIFIC_OPTIONS
|
|||||||
select MAINBOARD_FORCE_NATIVE_VGA_INIT
|
select MAINBOARD_FORCE_NATIVE_VGA_INIT
|
||||||
select HAVE_LINEAR_FRAMEBUFFER
|
select HAVE_LINEAR_FRAMEBUFFER
|
||||||
select DRIVER_PARADE_PS8640 if BOARD_GOOGLE_JACUZZI
|
select DRIVER_PARADE_PS8640 if BOARD_GOOGLE_JACUZZI
|
||||||
|
select DRIVER_ANALOGIX_ANX7625 if BOARD_GOOGLE_JUNIPER || BOARD_GOOGLE_DAMU || BOARD_GOOGLE_KAPPA
|
||||||
select MT8183_DRAM_EMCP if BOARD_GOOGLE_KRANE
|
select MT8183_DRAM_EMCP if BOARD_GOOGLE_KRANE
|
||||||
|
|
||||||
config MAINBOARD_DIR
|
config MAINBOARD_DIR
|
||||||
|
@ -30,4 +30,6 @@ ramstage-$(CONFIG_BOARD_GOOGLE_KODAMA) += panel_kodama.c
|
|||||||
ramstage-$(CONFIG_BOARD_GOOGLE_KRANE) += panel_krane.c
|
ramstage-$(CONFIG_BOARD_GOOGLE_KRANE) += panel_krane.c
|
||||||
ramstage-$(CONFIG_BOARD_GOOGLE_KUKUI) += panel_kukui.c
|
ramstage-$(CONFIG_BOARD_GOOGLE_KUKUI) += panel_kukui.c
|
||||||
ramstage-$(CONFIG_DRIVER_PARADE_PS8640) += panel_ps8640.c
|
ramstage-$(CONFIG_DRIVER_PARADE_PS8640) += panel_ps8640.c
|
||||||
|
ramstage-$(CONFIG_DRIVER_ANALOGIX_ANX7625) += panel_anx7625.c
|
||||||
|
|
||||||
ramstage-y += reset.c
|
ramstage-y += reset.c
|
||||||
|
79
src/mainboard/google/kukui/panel_anx7625.c
Normal file
79
src/mainboard/google/kukui/panel_anx7625.c
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2019 Google Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; version 2 of the License.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <console/console.h>
|
||||||
|
#include <delay.h>
|
||||||
|
#include <drivers/analogix/anx7625/anx7625.h>
|
||||||
|
#include <edid.h>
|
||||||
|
#include <gpio.h>
|
||||||
|
#include <soc/i2c.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "panel.h"
|
||||||
|
|
||||||
|
|
||||||
|
static void power_on_anx7625(void)
|
||||||
|
{
|
||||||
|
gpio_output(GPIO_MIPIBRDG_RST_L_1V8, 0);
|
||||||
|
gpio_output(GPIO_PP1200_MIPIBRDG_EN, 1);
|
||||||
|
gpio_output(GPIO_VDDIO_MIPIBRDG_EN, 1);
|
||||||
|
gpio_output(GPIO_PP1800_LCM_EN, 1);
|
||||||
|
mdelay(2);
|
||||||
|
gpio_output(GPIO_MIPIBRDG_PWRDN_L_1V8, 1);
|
||||||
|
mdelay(10);
|
||||||
|
gpio_output(GPIO_MIPIBRDG_RST_L_1V8, 1);
|
||||||
|
gpio_output(GPIO_PP3300_LCM_EN, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dummy_power_on(void)
|
||||||
|
{
|
||||||
|
/* The panel has been already powered on when getting panel information
|
||||||
|
* so we should do nothing here.
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct panel_serializable_data anx7625_data = {
|
||||||
|
.orientation = LB_FB_ORIENTATION_NORMAL,
|
||||||
|
.init = { INIT_END_CMD },
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct panel_description anx7625_panel = {
|
||||||
|
.s = &anx7625_data,
|
||||||
|
.power_on = dummy_power_on,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct panel_description *get_panel_description(int panel_id)
|
||||||
|
{
|
||||||
|
/* To read panel EDID, we have to first power on anx7625. */
|
||||||
|
power_on_anx7625();
|
||||||
|
|
||||||
|
u8 i2c_bus = 4;
|
||||||
|
mtk_i2c_bus_init(i2c_bus);
|
||||||
|
|
||||||
|
if (anx7625_init(i2c_bus)) {
|
||||||
|
printk(BIOS_ERR, "Can't init ANX7625 bridge.\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
struct edid *edid = &anx7625_data.edid;
|
||||||
|
if (anx7625_dp_get_edid(i2c_bus, edid)) {
|
||||||
|
printk(BIOS_ERR, "Can't get panel's edid.\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (anx7625_dp_start(i2c_bus, edid) < 0) {
|
||||||
|
printk(BIOS_ERR, "Can't start display via ANX7625.\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return &anx7625_panel;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user