Hi everyone,
We are using a custom board based on imx8qm mek devkit. We removed the USB type C, instead we use a USB micro-B. The USB is connected to the USBOH block as shown in the picture below.
We would like to download the bootloader via USB to a SPI nor flash memory using uuu tool.
Unfortunately after loading the boot image the imx8 doesn't come up as a new device under the device manager as it does on the devkit.. It supposed to come up as VID=0x0525, PID=0xa4a5 as defined in the defconfig
To boot the image from uuu we use: SDPS: boot -f flash.bin -skipfhdr.
The imx8 is properly booted but no USB device is found. We have followed some other posts about the same problem but with no success. So can you explain in detail how to use USB 2.0 usbotg1 instead of Type C usbotg2 for downloading image and what modification need to be done in defconfig, dts...? We have attached our dts and config files.
We are using uboot-imx branch imx_5.4.24_er3 and code has been modified as followed:
- imx8qm_mek_defconfig
diff --git a/configs/imx8qm_mek_defconfig b/configs/imx8qm_mek_defconfig
index dbe71b0..3ac302d 100644
--- a/configs/imx8qm_mek_defconfig
+++ b/configs/imx8qm_mek_defconfig
@@ -114,29 +114,29 @@ CONFIG_SF_DEFAULT_CS=0
CONFIG_SF_DEFAULT_SPEED=40000000
CONFIG_SF_DEFAULT_MODE=0
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_IMX8=y
+CONFIG_USB_XHCI_HCD=n
+CONFIG_USB_XHCI_IMX8=n
CONFIG_DM_USB=y
CONFIG_DM_USB_GADGET=y
CONFIG_SPL_DM_USB_GADGET=y
CONFIG_USB=y
-CONFIG_USB_TCPC=y
+CONFIG_USB_TCPC=n
CONFIG_USB_GADGET=y
CONFIG_CI_UDC=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_USB_GADGET_MANUFACTURER="FSL"
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
-CONFIG_USB_CDNS3=y
-CONFIG_USB_CDNS3_GADGET=y
+CONFIG_USB_CDNS3=n
+CONFIG_USB_CDNS3_GADGET=n
CONFIG_USB_GADGET_DUALSPEED=y
-CONFIG_CDNS3_USB_PHY=y
+CONFIG_CDNS3_USB_PHY=n
CONFIG_PHY=y
CONFIG_SPL_PHY=y
CONFIG_SPL_USB_GADGET=y
CONFIG_SPL_USB_SDP_SUPPORT=y
-CONFIG_SPL_SDP_USB_DEV=1
+CONFIG_SPL_SDP_USB_DEV=0
CONFIG_SDP_LOADADDR=0x80400000
CONFIG_FASTBOOT=y
@@ -147,7 +147,7 @@ CONFIG_FASTBOOT_UUU_SUPPORT=y
CONFIG_FASTBOOT_BUF_ADDR=0x82800000
CONFIG_FASTBOOT_BUF_SIZE=0x40000000
CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_USB_DEV=1
+CONFIG_FASTBOOT_USB_DEV=0
- fsl-imx8qm-mek.dts
typec_ptn5110 node for type c is commented out
&usbotg1 {
status = "okay";
}
&usbotg3 {
status = "disabled";
}
- fsl-imx8qm-mek-u-boot.dtsi
All nodes related to USB3 (usbh3, usbotg3, usbphynop1) have been commented out. Only usbotg1 is kept.
Can you explain as well which code should be executed to initialize the USB device? There is the function board_usb_init that should be called in imx8qm_mek.c, and surprisingly there is no code executed when index is different than 1. And it seems that at this stage of the boot this function is not called at all anyway. In our case index is 0 because we use USB2 otg1. Is there other code to check for this usb initialization?
Can someone please help with this, we are stuck in our development due to this problem.
Thank you for you help
Best Regards
已解决! 转到解答。
Problem solved, USB_OTG1_ID needed to be pulled up to High.
This link was a great help: https://community.nxp.com/t5/i-MX-Processors/MX6ULL-OTG-not-working/m-p/1034875