IMX8MM program uboot using UUU

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

IMX8MM program uboot using UUU

2,490 次查看
crcn
Contributor I

Hello,

I have a custom imx8mm board with a 512MB DDR4 (K4A4G165WE-BCTD) and a MMC (THGBMNG5D1LBAIL).

I'm trying to program the uboot using UUU software, but stop with that message:

U-Boot SPL 2020.04-00001-g62a81128c0-dirty (Feb 07 2023 - 11:01:55 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 2400MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from USB SDP
g_dnl_register: failed!, error: -12
SDP dnl register failed: -12
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

I saw that in ci_udc_probe function (in ci_udc.c file), failed in memalign

/* The QH list must be aligned to 4096 bytes. */
controller.epts = memalign(eplist_align, eplist_sz);
if (!controller.epts){
return -ENOMEM;
}

 

In my custom board I didn't have one USB type C, so I follow that topic:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MM-i-MX8MQ-USB2-0-Design-Without-US...

What can be wrong to failed?

Thanks in advance.

 

 

 

0 项奖励
回复
5 回复数

1,958 次查看
Lorac
Contributor III

FYI, I found the raison why on some board, I got this failure during uuu download.
Verify the state of USB1_ID (pinD22). In my board with issues, this signal was grounded or not floating.

Regards.
CD

2,476 次查看
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Could you share the actual changes you have made?
Also, from the logs seems like you’re using uboot 2020.04 is this correct?

Best regards,
Aldo.

0 项奖励
回复

2,471 次查看
crcn
Contributor I

Hi Aldo,

In the schematic, at the beginning I have the usb1 and usb2 configurated in that way.

I don't have any usb connector, but like I have, in another's projects it's work very well.

crcn_0-1675855616935.png

 

With that configuration, using UUU tool, In the terminal, the boot stops here:

U-Boot SPL 2020.04-00001-g62a81128c0-dirty (Feb 07 2023 - 15:50:55 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 2400MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from USB SDP
CRCN drivers/usb/imx/usb-mx6-common.c 303 val 3741319168 ctrl2 853803524
CRCN drivers/usb/gadget/ci_udc.c 960 4096 768
CRCN controller.epts is null
g_dnl_register: failed!, error: -12
SDP dnl register failed: -12
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

 

In the function ci_udc_probe in ci_udc.c  I have

static int ci_udc_probe(void)
{
struct ept_queue_head *head;
int i;
const int num = 2 * NUM_ENDPOINTS;
const int eplist_min_align = 4096;
const int eplist_align = roundup(eplist_min_align, ARCH_DMA_MINALIGN);
const int eplist_raw_sz = num * sizeof(struct ept_queue_head);
const int eplist_sz = roundup(eplist_raw_sz, ARCH_DMA_MINALIGN);
printf("CRCN %s %d %d %d\n",__FILE__,__LINE__,eplist_align,eplist_sz);
/* The QH list must be aligned to 4096 bytes. */
controller.epts = memalign(eplist_align, eplist_sz);
if (!controller.epts){
printf("CRCN controller.epts is null\n",__FILE__,__LINE__);
return -ENOMEM;
}
 
Then, I change the hardware, inserting the MIC2026, using only the A input/flag/output, and the result is the same.
 
As you can see, I put a printf ("CRCN controller.epts is null") if the result of the memalign is null.
 
Another test that I make, was configure  USBNC_n_CTRL2 register (0x32E40204), to change DIG_ID_SEL to 1 (0xDF100000). Result is the same..
 
Why the boot stops here, in memalign? For me is strange that the USB part of the schematic is bad, if the Uboot SPL start run... Can be another problem regarding DDR, MMC, etc???
 
Regarding your question about uboot version, I'm using uboot 2020.04.
 
Thanks.
0 项奖励
回复

2,439 次查看
AldoG
NXP TechSupport
NXP TechSupport

Hello,

I see that you are not using UBS_OTG_ID pin in your schematic even though it is defined as otg in your device tree and in your schematic, this could be causing the issue, please try by setting one of the 2 modes in device tree by using:
dr_mode = "peripheral";

Even one could use the i.MX6 as reference for this:
https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/dts/imx6qdl-sabresd.dtsi?h=lf_v20...

Best regards,
Aldo.

0 项奖励
回复

1,977 次查看
Lorac
Contributor III

I got the same thing on some board too. I think the issue is located on SPL code.

U-Boot SPL 2022.04-lf_v2022.04+g181859317b (Aug 30 2023 - 19:05:10 +0000)
Init PCA9450A
BOARD REVISION : A, OPTION : 0
DRAM : LPDDR4 2000 MB
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
g_dnl_register: failed!, error: -19
SDP dnl register failed: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###



0 项奖励
回复