From 08305fd8a0f30bc731915d8d695d795e0cdf4e5e Mon Sep 17 00:00:00 2001 From: vhaudiquet Date: Sun, 30 Aug 2026 11:18:57 +0200 Subject: [PATCH] WIP (temporary): add misc_init_r checkpoint band + backlight re-assert --- board/mediatek/mt8183/mt8183.c | 20 +++++++++++++++----- configs/mt8183_kukui_krane_defconfig | 1 + 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/board/mediatek/mt8183/mt8183.c b/board/mediatek/mt8183/mt8183.c index ae342e3ddcc..69941675cbc 100644 --- a/board/mediatek/mt8183/mt8183.c +++ b/board/mediatek/mt8183/mt8183.c @@ -5,12 +5,13 @@ */ /* - * TEMPORARY bring-up diagnostics (krane Round 13) — do not upstream. + * TEMPORARY bring-up diagnostics (krane Round 15) — do not upstream. * Paint colored bands into the live depthcharge scanout as early-init - * checkpoints: full green = wrapper (before U-Boot), orange top band = - * board_early_init_f, blue bottom band = dram_init_banksize, red top - * band = board_early_init_r. The last one reached localizes the crash; - * a successful video probe clears the screen for the banner. + * checkpoints: magenta full screen = wrapper (before U-Boot), orange + * top band = board_early_init_f, blue bottom band = dram_init_banksize, + * red top band = board_early_init_r, yellow band = misc_init_r (after + * the banner stage). The last one reached localizes the crash; a + * successful video probe clears the screen for the banner. */ #include #include @@ -60,6 +61,15 @@ int board_early_init_r(void) return 0; } +int misc_init_r(void) +{ + diag_paint(300, 60, 0x00ffff00); /* yellow */ + /* re-assert the backlight in case a probed driver cleared it */ + writel(0x800, (void __iomem *)0x10005114); + writel(0x10000, (void __iomem *)0x10005154); + return 0; +} + /* end TEMPORARY diagnostics */ #include diff --git a/configs/mt8183_kukui_krane_defconfig b/configs/mt8183_kukui_krane_defconfig index f97389fc95b..815d133ecd5 100644 --- a/configs/mt8183_kukui_krane_defconfig +++ b/configs/mt8183_kukui_krane_defconfig @@ -37,6 +37,7 @@ CONFIG_HUSH_PARSER=y CONFIG_BOOTDELAY=-1 CONFIG_BOARD_EARLY_INIT_F=y CONFIG_BOARD_EARLY_INIT_R=y +CONFIG_MISC_INIT_R=y # CONFIG_CMD_XIMG is not set # CONFIG_CMD_EXPORTENV is not set # CONFIG_CMD_IMPORTENV is not set