summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/herobrine/board.h4
-rw-r--r--src/mainboard/google/herobrine/mainboard.c37
2 files changed, 41 insertions, 0 deletions
diff --git a/src/mainboard/google/herobrine/board.h b/src/mainboard/google/herobrine/board.h
index 0e06cd9305..4c2aad6539 100644
--- a/src/mainboard/google/herobrine/board.h
+++ b/src/mainboard/google/herobrine/board.h
@@ -49,6 +49,10 @@
#define GPIO_EN_FP_RAILS dead_code_t(gpio_t)
#endif
+/* Display specific gpios */
+#define GPIO_PANEL_POWER_ON GPIO(80)
+#define GPIO_PANEL_HPD GPIO(60)
+
void setup_chromeos_gpios(void);
#endif /* _COREBOOT_SRC_MAINBOARD_GOOGLE_HEROBRINE_BOARD_H_ */
diff --git a/src/mainboard/google/herobrine/mainboard.c b/src/mainboard/google/herobrine/mainboard.c
index 0901ff0cc3..ece6d6859a 100644
--- a/src/mainboard/google/herobrine/mainboard.c
+++ b/src/mainboard/google/herobrine/mainboard.c
@@ -1,10 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include "board.h"
+#include <boardid.h>
#include <bootblock_common.h>
+#include <bootmode.h>
+#include <console/console.h>
+#include <delay.h>
#include <device/device.h>
#include <device/mmio.h>
+#include <edid.h>
#include <soc/clock.h>
+#include <soc/display/mdssreg.h>
+#include <soc/display/edp_ctrl.h>
#include <soc/qupv3_config_common.h>
#include <soc/qup_se_handlers_common.h>
#include <soc/qcom_qup_se.h>
@@ -46,6 +53,35 @@ static void qi2s_configure_gpios(void)
GPIO_NO_PULL, GPIO_16MA, GPIO_OUTPUT);
}
+static void edp_configure_gpios(void)
+{
+ /* Panel power on GPIO enable */
+ gpio_output(GPIO_PANEL_POWER_ON, 1);
+
+ /* Panel HPD GPIO enable */
+ gpio_input_pulldown(GPIO_PANEL_HPD);
+}
+
+static void display_startup(void)
+{
+ struct edid ed;
+
+ if (!display_init_required()) {
+ printk(BIOS_INFO, "Skipping display init.\n");
+ return;
+ }
+
+ enable_mdss_clk();
+ edp_configure_gpios();
+ mdelay(250); /* Delay for the panel to be up */
+ if (edp_ctrl_init(&ed) == CB_SUCCESS) {
+ mdp_dsi_video_config(&ed);
+ mdp_dsi_video_on();
+ edid_set_framebuffer_bits_per_pixel(&ed, 32, 0);
+ fb_new_framebuffer_info_from_edid(&ed, (uintptr_t)0);
+ }
+}
+
static void mainboard_init(struct device *dev)
{
/* Configure clock for eMMC */
@@ -102,6 +138,7 @@ static void mainboard_init(struct device *dev)
setup_usb();
qi2s_configure_gpios();
+ display_startup();
}
static void mainboard_enable(struct device *dev)