summaryrefslogtreecommitdiff
path: root/src/mainboard/google/geralt/mainboard.c
diff options
context:
space:
mode:
authorYidi Lin <yidilin@chromium.org>2024-01-03 16:07:24 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-01-10 14:20:25 +0000
commitba604b558e3a4e9e53c948391bc86a7bc775e6b3 (patch)
tree9a179c8219bb842507b0c2f2ba3d1e2852d680e9 /src/mainboard/google/geralt/mainboard.c
parent7224999497634dbd4c15fc8b1cdd4d2d2b39fec2 (diff)
soc/mediatek: Add common implementation to configure display
The sequences of configure_display() are similar on MediaTek platforms. The sequences usually involve following steps: 1. Setup mtcmos for display hardware block. - mtcmos_display_power_on() - mtcmos_protect_display_bus() 2. Configure backlight pins 3. Power on the panel - It also powers on the bridge in MIPI DSI to eDP case. 4. General initialization for DDP(display data path) 5. Initialize eDP/MIPI DSI accordingly, - For eDP path, it calls mtk_edp_init() to get edid from the panel and initializes eDP driver. - For MIPI DSI path, the edid is retrieved either from the bridge or from CBFS (the serializable data), and then initializes DSI driver. 6. Set framebuffer bits per pixel 7. Setup DDP mode 8. Setup panel orientation This patch extracts geralt/display.c to mediatek/common/display.c and refactors `struct panel_description` to generalize the display init sequences. configure_display() is also renamed to mtk_display_init(). TEST=check FW screen on geralt. Change-Id: I403bba8a826de5f3fb2ea96a5403725ff194164f Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79776 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/geralt/mainboard.c')
-rw-r--r--src/mainboard/google/geralt/mainboard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mainboard/google/geralt/mainboard.c b/src/mainboard/google/geralt/mainboard.c
index 6bb8380a64..3f9ab5d0f6 100644
--- a/src/mainboard/google/geralt/mainboard.c
+++ b/src/mainboard/google/geralt/mainboard.c
@@ -3,13 +3,13 @@
#include <bootmode.h>
#include <device/device.h>
#include <soc/bl31.h>
+#include <soc/display.h>
#include <soc/i2c.h>
#include <soc/msdc.h>
#include <soc/mt6359p.h>
#include <soc/mtcmos.h>
#include <soc/usb.h>
-#include "display.h"
#include "gpio.h"
#define AFE_SE_SECURE_CON (AUDIO_BASE + 0x17a8)
@@ -44,7 +44,7 @@ static void mainboard_init(struct device *dev)
mt6359p_init_pmif_arb();
if (display_init_required()) {
- if (configure_display() < 0)
+ if (mtk_display_init() < 0)
printk(BIOS_ERR, "%s: Failed to init display\n", __func__);
} else {
printk(BIOS_INFO, "%s: Skipped display initialization\n", __func__);