diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index ef1eae6c8536693a0811aa7cf4ce694d7e02bc33..ce8ea9bdd7d40f208ce22197cbadc5c0185279f9 100755
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -1788,6 +1788,9 @@ void board_fastboot_setup(void)
 	} else if (is_imx8qxp()) {
 		if (!getenv("soc_type"))
 			setenv("soc_type", "imx8qxp");
+	} else if (is_imx8m()) {
+		if (!getenv("soc_type"))
+			setenv("soc_type", "imx8mq");
 	}
 }