]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: ti: am62x: evm: Update simple-framebuffer node in device-tree
authorDevarsh Thakkar <devarsht@ti.com>
Wed, 25 Sep 2024 15:13:54 +0000 (20:43 +0530)
committerAnatolij Gustschin <agust@denx.de>
Tue, 22 Oct 2024 17:55:28 +0000 (19:55 +0200)
Update simple-framebuffer device-tree node by enumerating framebuffer
related information in existing simple-framebuffer node in Linux
device-tree file and enabling it.

In case there is no simple-framebuffer stub detected in Linux kernel
device-tree and video is still active, then update the device-tree to
reserve the framebuffer region for the active splash screen.

This helps preserve the splash screen till the display server takes over
after OS is booted.

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
board/ti/am62x/evm.c

index 1166c9b8e09fb5ca3a5b237022991472024a28d3..9075df01cac626f555a1920347283bc8af98a62a 100644 (file)
@@ -16,6 +16,7 @@
 #include <cpu_func.h>
 #include <k3-ddrss.h>
 #include <fdt_support.h>
+#include <fdt_simplefb.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <dm/uclass.h>
@@ -162,3 +163,23 @@ void spl_perform_fixups(struct spl_image_info *spl_image)
 #endif
 }
 #endif
+
+#if defined(CONFIG_OF_BOARD_SETUP)
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+       int ret = -1;
+
+       if (IS_ENABLED(CONFIG_FDT_SIMPLEFB))
+               ret = fdt_simplefb_enable_and_mem_rsv(blob);
+
+       /* If simplefb is not enabled and video is active, then at least reserve
+        * the framebuffer region to preserve the splash screen while OS is booting
+        */
+       if (IS_ENABLED(CONFIG_VIDEO) && IS_ENABLED(CONFIG_OF_LIBFDT)) {
+               if (ret && video_is_active())
+                       return fdt_add_fb_mem_rsv(blob);
+       }
+
+       return 0;
+}
+#endif