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 1d01cec0296d56ba8436941864d8da81013e0732)
This commit is contained in:
Ye Li 2017-08-23 04:40:58 -05:00
parent 68ef7f2c5d
commit 89512c1b28
1 changed files with 34 additions and 0 deletions

View File

@ -186,6 +186,40 @@ int ft_system_setup(void *blob, bd_t *bd)
int i = 0;
int rc;
int nodeoff;
if (get_boot_device() == USB_BOOT) {
static const char *nodes_path[] = {
"/dcss@32e00000",
"/hdmi@32c00000",
"/hdmi_cec@32c33800",
"/hdmi_drm@32c00000",
"/display-subsystem",
"/sound-hdmi"
};
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");
}
}
/* Disable the CPU idle for A0 chip since the HW does not support it */
if (is_soc_rev(CHIP_REV_1_0)) {