Browse Source

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: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit b6b4b9498a)
Ye Li 3 years ago
parent
commit
871e9e924a
2 changed files with 44 additions and 0 deletions
  1. +42
    -0
      arch/arm/cpu/armv8/imx8m/soc.c
  2. +2
    -0
      include/configs/imx8mq_evk.h

+ 42
- 0
arch/arm/cpu/armv8/imx8m/soc.c View File

@ -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

+ 2
- 0
include/configs/imx8mq_evk.h View File

@ -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


Loading…
Cancel
Save