I'm trying to bring up a custom board with iMX8M mini processor with 32bit LPDDR4 RAM, Where i'm able to bring up the uboot using SDP mode by setting boot in Serial Download and trying to use boot linux kernel using uuu script. Here i'm trying to to use RAMDISK in kernel so no need to flash emmc.
while trying to bring up USB on USB1 i'm getting No USB device found USB init failed: -19 Here i've attached all my changes. If anyone point me to specific area where to troubleshoot further. We have removed type c port from code as we are not using the one.
I'm using u-boot from branch lf_v2022.04 and kernel from branch lf-5.15.71-2.2.0.
UUU script
uuu_version 1.5.165
# Please Replace below items with actually file names
# @_flash.bin | boot loader
# @_Image | kernel image, arm64 is Image, arm32 it is zImage
# @_board.dtb | board dtb file
# @_initramfs.cpio.gz.uboot | mfgtool init ramfs
# @_rootfs.tar.bz2 | rootfs
# @_uTee.tar | optee image, put dummy _uTee.tar file here if platform is not MX6/MX7*
# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
SDP: boot -f imx-boot.bin
# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS[-t 10000]: boot -f imx-boot.bin
# These commands will be run when use SPL and will be skipped if no spl
# SDPU will be deprecated. please use SDPV instead of SDPU
# {
SDPU: delay 1000
SDPU: write -f imx-boot.bin -offset 0x57c00
SDPU: jump
#SDPU: done
# }
# These commands will be run when use SPL and will be skipped if no spl
# if (SPL support SDPV)
# {
SDPV: delay 1000
SDPV: write -f imx-boot.bin -skipspl
SDPV: jump
#SDPV: done
# }
# use uboot burn bootloader to eMMC
# becaue difference chip, offset is difference
# you can use kernel to do that for specific boards
FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
FB: ucmd setenv emmc_cmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
FB: ucmd if test "${emmc_skip_fb}" != "yes"; then run emmc_cmd; fi
FB: ucmd setenv emmc_cmd mmc bootbus ${emmc_dev} 2 2 1;
FB: ucmd if test "${emmc_skip_fb}" != "yes"; then run emmc_cmd; fi
FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f Image
FB: ucmd setenv fastboot_buffer ${fdt_addr}
FB: download -f imx8mm-mez.dtb
FB: ucmd setenv fastboot_buffer ${initrd_addr}
FB: download -f rootfs-overlay-initramfs-imx8mm-mez-20240403050131.rootfs.cpio.gz
#FB: ucmd setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate}
FB: acmd ${kboot} ${loadaddr} ${initrd_addr} ${fdt_addr}
Boot log
U-Boot SPL 2022.04-dirty (Apr 11 2024 - 12:50:52 +0530)
power_bd71837_init
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
SEC0: RNG instantiated
Normal Boot
Trying to boot from USB SDP
board_usb_init 0, type 1
SDP: initialize...
SDP: handle requests...
Downloading file of size 1303888 to 0x40400000... done
Jumping to header at 0x40400000
Header Tag is not an IMX image
Found header at 0x40427fa0
board_usb_cleanup 0, type 1
NOTICE: BL31: v2.6(release):lf-6.1.1-1.0.0-0-g616a4588f-dirty
NOTICE: BL31: Built : 06:16:04, Apr 4 2024
U-Boot 2022.04-dirty (Apr 11 2024 - 12:50:52 +0530)
CPU: i.MX8MMS rev1.0 1800 MHz (running at 1200 MHz)
CPU: Commercial temperature grade (0C to 95C) at 58C
Reset cause: POR
Model: Silmates i.MX8MM SoM board
DRAM: 512 MiB
Core: 73 devices, 25 uclasses, devicetree: separate
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... *** Warning - bad CRC, using default environment
[*]-Video Link 0probe video device failed, ret -2
[0] lcdif@32e00000, video
[1] mipi_dsi@32e10000, video_bridge
[2] adv7535@3d, panel
probe video device failed, ret -2
In: serial
Out: serial
Err: serial
SEC0: RNG instantiated
BuildInfo:
- ATF 616a458
switch to partitions #0, OK
mmc2(part 0) is current device
Detect USB boot. Will enter fastboot mode!
Net:
Warning: ethernet@30be0000 (eth0) using random MAC address - 92:85:f8:75:c0:7f
eth0: ethernet@30be0000
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for mfgtools
, using default environment
Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_a
ddr} ${fdt_addr}; else booti ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
Hit any key to stop autoboot: 0
## Checking Image at 43800000 ...
Unknown image format!
Run fastboot ...
controller_index : 0
No USB device found
USB init failed: -19
u-boot=> usb start
starting USB...
Bus usb@32e40000: board_usb_init 0, type 0
Port not available.
u-boot=>
usb initialization in board.c
int board_usb_init(int index, enum usb_init_type init)
{
int ret = 0;
printf("board_usb_init %d, type %d\n", index, init);
imx8m_usb_power(index, true);
return ret;
}
int board_usb_cleanup(int index, enum usb_init_type init)
{
int ret = 0;
printf("board_usb_cleanup %d, type %d\n", index, init);
imx8m_usb_power(index, false);
return ret;
}
int board_ehci_usb_phy_mode(struct udevice *dev)
{
printf("........ board_ehci_usb_phy_mode comein %d \n",dev->seq_);
return USB_INIT_DEVICE;
}
device tree settings in uboot
&usbotg1 {
dr_mode = "otg";
status = "okay";
};
&usbotg2 {
status = "disabled";
};
default defconfig for usb in uboot
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_USB_SDP=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_USB_TCPC=n
CONFIG_USB=y
CONFIG_USB_GADGET=y
CONFIG_USB_STORAGE=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_RTL8152=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_USB_GADGET_MANUFACTURER="FSL"
CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
CONFIG_USB_GADGET_PRODUCT_NUM=0x0152
CONFIG_FASTBOOT_USB_DEV=0
CONFIG_SPL_USB_HOST=y
CONFIG_SPL_USB_GADGET=y
CONFIG_SPL_USB_SDP_SUPPORT=y
Solved! Go to Solution.
Got solution
Who ever want to port u-boot for custom board consider board-u-boot.dtsi file u-boot consider this file without mentioning in Makefile.
Below is the link which describe the functionality of xxx-u-boot.dtsi.
Got solution
Who ever want to port u-boot for custom board consider board-u-boot.dtsi file u-boot consider this file without mentioning in Makefile.
Below is the link which describe the functionality of xxx-u-boot.dtsi.