Commit e31f99c0 authored by Ye Li's avatar Ye Li
Browse files

MLK-16974 imx8m: Modify kernel DTB to limit USB to high-speed for mfgtool



We found USB issue when using super-speed for mfgtool, temporally work around
the problem to use high-speed only.
Signed-off-by: default avatarYe Li <ye.li@nxp.com>
Reviewed-by: default avatarLi Jun <jun.li@nxp.com>
parent 5ad6d4cc
......@@ -476,6 +476,31 @@ add_status:
nodes_path[i], "status");
}
}
const char *usb_dwc3_path = "/usb@38100000/dwc3";
nodeoff = fdt_path_offset(blob, usb_dwc3_path);
if (nodeoff >= 0) {
const char *speed = "high-speed";
printf("Found %s node\n", usb_dwc3_path);
usb_modify_speed:
rc = fdt_setprop(blob, nodeoff, "maximum-speed", speed, strlen(speed) + 1);
if (rc) {
if (rc == -FDT_ERR_NOSPACE) {
rc = fdt_increase_size(blob, 512);
if (!rc)
goto usb_modify_speed;
}
printf("Unable to set property %s:%s, err=%s\n",
usb_dwc3_path, "maximum-speed", fdt_strerror(rc));
} else {
printf("Modify %s:%s = %s\n",
usb_dwc3_path, "maximum-speed", speed);
}
}else {
printf("Can't found %s node\n", usb_dwc3_path);
}
}
/* Disable the CPU idle for A0 chip since the HW does not support it */
......
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