board: ti: dra7xx: Set fdtfile from C code instead of findfdt script
authorAnurag Dutta <a-dutta@ti.com>
Mon, 1 Sep 2025 06:16:59 +0000 (11:46 +0530)
committerTom Rini <trini@konsulko.com>
Mon, 8 Sep 2025 14:44:33 +0000 (08:44 -0600)
We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
board/ti/dra7xx/evm.c

index 98d63e1..0966db2 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "mux_data.h"
 #include "../common/board_detect.h"
+#include "../common/fdt_ops.h"
 
 #define board_is_dra76x_evm()          board_ti_is("DRA76/7x")
 #define board_is_dra74x_evm()          board_ti_is("5777xCPU")
@@ -665,6 +666,15 @@ static int device_okay(const char *path)
 }
 #endif
 
+static struct ti_fdt_map ti_omap_dra7_evm_fdt_map[] = {
+       {"omap5_uevm", "ti/omap/omap5-uevm.dtb"},
+       {"dra7xx", "ti/omap/dra7-evm.dtb"},
+       {"dra72x-revc", "ti/omap/dra72-evm-revc.dtb"},
+       {"dra72x", "ti/omap/dra72-evm.dtb"},
+       {"dra71x", "ti/omap/dra71-evm.dtb"},
+       {"dra76x_acd", "ti/omap/dra76-evm.dtb"},
+};
+
 int board_late_init(void)
 {
 #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
@@ -686,6 +696,7 @@ int board_late_init(void)
        }
 
        set_board_info_env(name);
+       ti_set_fdt_env(name, ti_omap_dra7_evm_fdt_map);
 
        /*
         * Default FIT boot on HS devices. Non FIT images are not allowed