Commit 1d01cec0 authored by Ye Li's avatar Ye Li Committed by Jason Liu

MLK-16246 imx8mq_evk: Update DTB to disable DCSS and HDMI for mfgtool

When booting for mfgtool, we need to disable DCSS and HDMI since the HDMI
firmware won't be loaded by mfgtool. Add the detect in u-boot and update the
DTB.
Signed-off-by: default avatarYe Li <ye.li@nxp.com>
Acked-by: default avatarPeng Fan <peng.fan@nxp.com>
parent 9277316c
......@@ -12,6 +12,7 @@
#include <asm/imx-common/boot_mode.h>
#include <asm/armv8/mmu.h>
#include <errno.h>
#include <fdt_support.h>
DECLARE_GLOBAL_DATA_PTR;
......@@ -365,3 +366,44 @@ void get_board_serial(struct tag_serialnr *serialnr)
serialnr->high = 0;
}
#endif
#ifdef CONFIG_OF_SYSTEM_SETUP
int ft_system_setup(void *blob, bd_t *bd)
{
if (get_boot_device() == USB_BOOT) {
const char *nodes_path[] = {
"/dcss@32e00000",
"/hdmi@32c00000",
};
int i = 0;
int rc;
int nodeoff;
const char *status = "disabled";
for (i = 0; i < ARRAY_SIZE(nodes_path); i++) {
nodeoff = fdt_path_offset(blob, nodes_path[i]);
if (nodeoff < 0)
continue; /* Not found, skip it */
printf("Found %s node\n", nodes_path[i]);
add_status:
rc = fdt_setprop(blob, nodeoff, "status", status, strlen(status) + 1);
if (rc) {
if (rc == -FDT_ERR_NOSPACE) {
rc = fdt_increase_size(blob, 512);
if (!rc)
goto add_status;
}
printf("Unable to update property %s:%s, err=%s\n",
nodes_path[i], "status", fdt_strerror(rc));
} else {
printf("Modify %s:%s disabled\n",
nodes_path[i], "status");
}
}
}
return 0;
}
#endif
......@@ -271,6 +271,8 @@
#define CONFIG_CMD_EXT2
#endif
#define CONFIG_OF_SYSTEM_SETUP
#if defined(CONFIG_ANDROID_SUPPORT)
#include "imx8mq_evk_android.h"
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment