summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSinthu Raja <sinthu.raja@ti.com>2023-10-11 23:16:09 +0530
committerUdit Kumar <u-kumar1@ti.com>2023-10-12 21:09:02 +0530
commitdf13305f3aa9a7cbe7836b497824d5127d921e33 (patch)
tree49387df29f8493edfb3521ccf3e5a77f2455c785 /include
parentdc9d4bee711db4da07dab3998f0e9646f39f86d7 (diff)
include: configs: omap5: Add support for FDT overlay
As AM57x uses overlays for display and camera interfaces, add support to load DT overlay files to MMC boot. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/ti_omap5_common.h11
-rw-r--r--include/environment/ti/mmc.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index 4305f8dc10..1c8fb72942 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -239,6 +239,16 @@
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0"
+#define GET_OVERLAY_MMC_TI_ARGS \
+ "get_overlay_mmc=" \
+ "fdt address ${fdtaddr};" \
+ "fdt resize 0x100000;" \
+ "for overlay in $name_overlays;" \
+ "do;" \
+ "load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/${overlay} &&" \
+ "fdt apply ${dtboaddr};" \
+ "done;\0" \
+
#define BOOT_TARGET_DEVICES(func) \
func(TI_MMC, ti_mmc, na) \
func(MMC, mmc, 0) \
@@ -269,6 +279,7 @@
"get_fit_config=setenv name_fit_config conf-${fdtfile}\0" \
DEFAULT_COMMON_BOOT_TI_ARGS \
DEFAULT_FDT_TI_ARGS \
+ GET_OVERLAY_MMC_TI_ARGS \
DFUARGS \
NETARGS \
NANDARGS \
diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h
index 769ea9d5ef..128beb2f14 100644
--- a/include/environment/ti/mmc.h
+++ b/include/environment/ti/mmc.h
@@ -44,6 +44,7 @@
"mmcloados=" \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
+ "run get_overlay_mmc;" \
"bootz ${loadaddr} - ${fdtaddr}; " \
"else " \
"if test ${boot_fdt} = try; then " \