I am trying to flash a imx-boot-imx8mm-sd.bin-flash_evk uboot image created by yocto/bitbake onto a custom i.MX8M mini board. I have modified the uboot-imx files for the i.MX8M mini dev kit: device tree, spl.c, imx8mm_evk.c, and imx8mm_evk_defconfig. The primary hardware differences that my changes address are:
1. eMMC on interface uSDHC1 instead of uSDHC3: modified device tree and spl.c pin definitions and board_mmc_init() function.
2. USB type mini-B instead of C: modified defconfig file with CONFIG_USB_TCPC=n and device tree entry for usb_otg1.
The uuu commands used are:
uuu_version 1.0.1
SDP: boot -f files/imx-boot-imx8mmea-ucom-sd.bin
# This command will be run when use SPL
SDPU: write -f files/imx-boot-imx8mmea-ucom-sd.bin -offset 0x57c00
SDPU: jump
# This command will be run when ROM support stream mode
SDPS: boot -f files/imx-boot-imx8mmea-ucom-sd.bin
FB: ucmd env default -a
FB: ucmd printenv
FB: ucmd mmc list
FB: ucmd saveenv
FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev 1
FB: ucmd mmc info
FB: ucmd mmc dev ${emmc_dev}
FB: ucmd mmc info
FB: flash bootloader files/imx-boot-imx8mm-sd.bin-flash_evk
FB: done
The script does seem to be getting to any of the FB commands, however.
The UART from the i.MX8M mini is as follows:
U-Boot SPL 2018.03-imx_v2018.03_4.14.78_1.0.0_ga+g654088c (Apr 21 2021 - 14:02:50 +0000)
power_bd71837_init
DDRINFO: start lpddr4 ddr init
DRAM PHY training for 3000MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
DRAM PHY training for 400MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
DRAM PHY training for 100MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
DRAM PHY training for 3000MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from USB SDP
SDP: initialize...
SDP: handle requests...
Downloading file of size 635808 to 0x40400000... done
Jumping to header at 0x40400000
Header Tag is not an IMX image
U-Boot 2018.03-imx_v2018.03_4.14.78_1.0.0_ga+g654088c (Apr 21 2021 - 14:02:50 +0000)
CPU: Freescale i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 48C
Reset cause: POR
Model: FSL i.MX8MM EVK board
DRAM: 2 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... Card did not respond to voltage select!
*** Warning - No block device, using default environment
Failed (-5)
In: serial
Out: serial
Err: serial
BuildInfo:
- ATF a-20190
- U-Boot 2018.03-imx_v2018.03_4.14.78_1.0.0_ga+g654088c
Card did not respond to voltage select!
Detect USB boot. Will enter fastboot mode!
Net:
Error: ethernet@30be0000 address not set.
No ethernet found.
Fastboot: Normal
Boot from USB for mfgtools
Use default environment for mfgtools
Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${ tee_addr} ${initrd_addr} ${fdt_addr}; else booti ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else ec ho "Run fastboot ..."; fastboot 0; fi;
Hit any key to stop autoboot: 0
## Checking Image at 43800000 ...
Unknown image format!
Run fastboot ...
g_dnl_register: failed!, error: -19
Another forum post related to flashing the bootloader on the dev kit had identical errors:
Error: "Card did not respond to voltage select!"
Probing the clock and data lines between the processor and the eMMC card show no activity, so the processor does not seem to be trying to talk through the uSDHC1 interface. I have double checked pin definitions in the device tree file and spl.c file. What other places should the uSDHC1 interface be defined? How else can I troubleshoot no communication?
Error: "g_dnl_register: failed!, error: -19"
I saw this same error earlier in the process when we incorrectly had the USB interface designated as "host" by tying the USB1_ID to ground. Now the USB1_ID is floating to be a "device". Is this USB1_ID "device" designation causing an error? Are there other considerations when using USB B instead of USB C?
Thanks in advance for your help.
已解决! 转到解答。
Igor,
Thanks for your input. Your linked information was helpful. I was missing the eMMC designation in include/configs/imx8mm_evk.h
#define CONFIG_MFG_ENV_SETTINGS \
CONFIG_MFG_ENV_SETTINGS_DEFAULT \
... "emmc_dev=0\0"\
"sd_dev=1\0" \
In addition, I found upgrading to u-boot 2020.04_5.4.47 to be necessary. In this version there is an extra device tree file arch/arm/dts/imx8mm-evk-u-boot.dtsi file where I needed this entry:
&usdhc1 {
u-boot,dm-spl;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
assigned-clocks = <&clk IMX8MM_CLK_USDHC3>;
assigned-clock-rates = <400000000>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_400M>;
};
These changes allowed me to load the bootloader on the eMMC at uSDHC1 interface.
Alice
Igor,
Thanks for your input. Your linked information was helpful. I was missing the eMMC designation in include/configs/imx8mm_evk.h
#define CONFIG_MFG_ENV_SETTINGS \
CONFIG_MFG_ENV_SETTINGS_DEFAULT \
... "emmc_dev=0\0"\
"sd_dev=1\0" \
In addition, I found upgrading to u-boot 2020.04_5.4.47 to be necessary. In this version there is an extra device tree file arch/arm/dts/imx8mm-evk-u-boot.dtsi file where I needed this entry:
&usdhc1 {
u-boot,dm-spl;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
assigned-clocks = <&clk IMX8MM_CLK_USDHC3>;
assigned-clock-rates = <400000000>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_400M>;
};
These changes allowed me to load the bootloader on the eMMC at uSDHC1 interface.
Alice
Hi Alice
one can try suggestions provided on
Best regards
igor