AnsweredAssumed Answered

How to enable USB 2.0 in U-Boot for imx8qxp_mek_android

Question asked by dong wang on Mar 12, 2019
Latest reply on Jun 27, 2019 by tiebing guo

Hello Bro

we used android_o8.1.0_2.0.0-beta which is release from website, and want to use USB2.0 (otg_1) throuth UUU tools to down the image to the emmc, we follow the documentation named is "Android™ User's Guide, Rev. O8.1.0_2.0.0-beta, 01/2019 " mentioned with "8.4 How to enable USB 2.0 in U-Boot for i.MX 8QuadMax/ 8QuadXPlus ", i change the config as below:

 

===========================================================================================

diff --git a/configs/imx8qxp_mek_android_defconfig b/configs/imx8qxp_mek_android_defconfig
index e88c05a..ddf577b 100644
--- a/configs/imx8qxp_mek_android_defconfig
+++ b/configs/imx8qxp_mek_android_defconfig
@@ -20,8 +20,8 @@ CONFIG_CMD_I2C=y
 CONFIG_I2C_MUX=y
 CONFIG_I2C_MUX_PCA954x=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_IMX8=y
+# CONFIG_USB_XHCI_HCD is not set
+# CONFIG_USB_XHCI_IMX8 is not set
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
@@ -33,14 +33,14 @@ CONFIG_USB_TCPC=y
 CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_USB_GADGET=y
-# CONFIG_CI_UDC=y
+CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_GADGET_MANUFACTURER="FSL"
 CONFIG_USB_GADGET_VENDOR_NUM=0x18d1
 CONFIG_USB_GADGET_PRODUCT_NUM=0x0d02
-CONFIG_USB_CDNS3=y
-CONFIG_USB_CDNS3_GADGET=y
+# CONFIG_USB_CDNS3 is not set
+# CONFIG_USB_CDNS3_GADGET is not set
 CONFIG_USB_GADGET_DUALSPEED=y
 CONFIG_CMD_GPIO=y
===============================================================================================
and also include named is "uuu" config
===============================================================================================
diff --git a/configs/imx8qxp_mek_android_uuu_defconfig b/configs/imx8qxp_mek_android_uuu_defconfig
index 05089b0..e6b1310 100644
--- a/configs/imx8qxp_mek_android_uuu_defconfig
+++ b/configs/imx8qxp_mek_android_uuu_defconfig
@@ -20,8 +20,8 @@ CONFIG_CMD_I2C=y
 CONFIG_I2C_MUX=y
 CONFIG_I2C_MUX_PCA954x=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_IMX8=y
+# CONFIG_USB_XHCI_HCD is not set
+# CONFIG_USB_XHCI_IMX8 is not set
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
@@ -33,14 +33,14 @@ CONFIG_USB_TCPC=y
 CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_USB_GADGET=y
-# CONFIG_CI_UDC=y
+CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_GADGET_MANUFACTURER="FSL"
 CONFIG_USB_GADGET_VENDOR_NUM=0x18d1
 CONFIG_USB_GADGET_PRODUCT_NUM=0x0d02
-CONFIG_USB_CDNS3=y
-CONFIG_USB_CDNS3_GADGET=y
+# CONFIG_USB_CDNS3 is not set
+# CONFIG_USB_CDNS3_GADGET is not set
 CONFIG_USB_GADGET_DUALSPEED=y
 CONFIG_CMD_GPIO=y
================================================================================================
and also changed 
================================================================================================
diff --git a/include/configs/imx8qm_mek_android.h b/include/configs/imx8qm_mek_android.h
index bc8a5ec..5f5b00b 100644
--- a/include/configs/imx8qm_mek_android.h
+++ b/include/configs/imx8qm_mek_android.h
@@ -40,7 +40,7 @@
 #define CONFIG_FASTBOOT_FLASH
 #define CONFIG_FSL_FASTBOOT
-#define CONFIG_FASTBOOT_USB_DEV 1
+#define CONFIG_FASTBOOT_USB_DEV 0
 #define CONFIG_ANDROID_RECOVERY
 #if defined CONFIG_SYS_BOOT_SATA
==============================================================================================
after complie uboot , and use UUU toools to download, looks the PC still can not found the USB 2.0 and the uuu-boot boot log is :
==============================================================================================
U-Boot 2018.03-dirty (Mar 13 2019 - 03:59:46 +0800)
CPU:   Freescale i.MX8QXP revB A35 at 1200 MHz at 36C
Model: Freescale i.MX8QXP MEK
Board: iMX8QXP MEK
Boot:  USB
DRAM:  3 GiB
setup_typec lookup gpio@1a_7 failed ret = 3
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... MMC: no card present
*** Warning - No block device, using default environment
Failed (-5)
TX PLL is not locked.
No panel detected: default to IT6263
Display: IT6263 (1280x720)
In:    serial
Out:   serial
Err:   serial
 BuildInfo:
  - SCFW 65afe5f6, SECO-FW 9d71fd5b, IMX-MKIMAGE 19b9d9b6, ATF d6451cc
  - U-Boot 2018.03-dirty
Detect USB boot. Will enter fastboot mode!
Net:   No ethernet found.
MMC: no card present
Block device mmc 1 not supported
bcb_rw_block, get_block_size return 0
read_bootctl, bcb_rw_block read failed
read command failed
Fastboot: Normal
Boot from USB for uuu
Hit any key to stop autoboot:  0
g_dnl_register: failed!, error: -19
=>
can you give us more advice and how can use uuu tools to down load the image through USB 2.0 otg_1 port?
thanks a lot
neil.wang
2019-3-13

Outcomes