diff options
author | Vinod Polimera <quic_vpolimer@quicinc.com> | 2022-05-30 18:03:41 +0530 |
---|---|---|
committer | Shelley Chen <shchen@google.com> | 2022-08-03 03:26:13 +0000 |
commit | 4ce67c02b215c570bb62305318a801c724e70c2f (patch) | |
tree | 4bf907ee3691c7941c9f8aa687c9de40734e21c6 /src/mainboard/google/herobrine/mainboard.c | |
parent | 4e93e94c7c8ee50bba395ac09d9a23cab685fd2c (diff) |
mb/google/herobrine: Add support to enable display
This change adds support to enable edp gpios, display init for
herobrine.
BUG=b:182963902,b:216687885
TEST=Validated on qualcomm sc7280 development board.
Monitor name: LQ140M1JW49
Change-Id: I01dbe23afbb3d41d87f24cb7dcfa456cb7f133fb
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64885
Reviewed-by: Shelley Chen <shchen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/herobrine/mainboard.c')
-rw-r--r-- | src/mainboard/google/herobrine/mainboard.c | 37 |
1 files changed, 37 insertions, 0 deletions
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) |