summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2020-05-05 20:28:44 +0800
committerStefano Babic <sbabic@denx.de>2020-05-10 20:55:20 +0200
commite825d3089abbca850d8370bcbeaa8dc6e5d4a69a (patch)
tree275fdab43e110fe5826625a02bf1e81f59571538 /board
parented5b253d0e3e6290e63afdb37b71ce9503b6bd5f (diff)
downloadu-boot-e825d3089abbca850d8370bcbeaa8dc6e5d4a69a.tar.gz
u-boot-e825d3089abbca850d8370bcbeaa8dc6e5d4a69a.tar.bz2
u-boot-e825d3089abbca850d8370bcbeaa8dc6e5d4a69a.zip
imx: imx8qm: update fdt_file according to m4 state
Update fdt_file according to m4 parts state Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/imx8qm_mek/imx8qm_mek.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c
index c9b9b2547e..c0cae3540f 100644
--- a/board/freescale/imx8qm_mek/imx8qm_mek.c
+++ b/board/freescale/imx8qm_mek/imx8qm_mek.c
@@ -123,10 +123,23 @@ int board_mmc_get_env_dev(int devno)
int board_late_init(void)
{
+ char *fdt_file;
+ bool m4_booted;
+
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
env_set("board_name", "MEK");
env_set("board_rev", "iMX8QM");
#endif
+ fdt_file = env_get("fdt_file");
+ m4_booted = m4_parts_booted();
+
+ if (fdt_file && !strcmp(fdt_file, "undefined")) {
+ if (m4_booted)
+ env_set("fdt_file", "imx8qm-mek-rpmsg.dtb");
+ else
+ env_set("fdt_file", "imx8qm-mek.dtb");
+ }
+
return 0;
}