Enable the simple-framebuffer node of the Linux devicetree to preserve
the splash screen until the Linux display driver takes over.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
board/engicam/stm32mp2/stm32mp2.c | 21 +++++++++++++++++++++
configs/stm32mp25-microgea-rmm_defconfig | 2 ++
2 files changed, 23 insertions(+)
--
2.43.0
@@ -12,6 +12,7 @@
#include <env.h>
#include <event.h>
#include <extension_board.h>
+#include <fdt_simplefb.h>
#include <fdt_support.h>
#include <log.h>
#include <splash.h>
@@ -147,6 +148,26 @@ int splash_screen_prepare(void)
}
#endif
+#if CONFIG_IS_ENABLED(OF_BOARD_SETUP)
+/*
+ * Describe the splash screen framebuffer to Linux, so that it keeps the
+ * display on until its display driver takes over.
+ */
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+ int ret;
+
+ if (IS_ENABLED(CONFIG_FDT_SIMPLEFB)) {
+ ret = fdt_simplefb_enable_and_mem_rsv(blob);
+ if (ret)
+ log_warning("cannot hand over the framebuffer (%d)\n",
+ ret);
+ }
+
+ return 0;
+}
+#endif
+
#if CONFIG_IS_ENABLED(OF_BOARD_FIXUP)
/*
* The FWU metadata are stored in the boot device, the SD card or the
@@ -24,6 +24,8 @@ CONFIG_EFI_CAPSULE_ON_DISK=y
CONFIG_FIT=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_BOOTDELAY=1
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_FDT_SIMPLEFB=y
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
# CONFIG_BOARD_INIT is not set
CONFIG_SYS_PROMPT="STM32MP> "