Error when writing u-boot to imx8mp_evk custom board(USB init failed: -22)

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

Error when writing u-boot to imx8mp_evk custom board(USB init failed: -22)

1,225 次查看
eclipse5685
Contributor I

When I try to write uboot to a custom imx8mp_evk board using uuu, I get the following error message(1):
Since the custom board does not use USB-TypeC, I removed PTN5110 from imx8mp_evk.dts and also failed to write "CONFIG_USB_TCPC = n".(error message(2))
What should I do to be able to write u-boot with uuu?

【error message(1)】
U-Boot 2023.04-imx_v2023.04_6.1.22-2.0.0+gaf7d004eaf1 (Jun 06 2023 - 14:59:40 +0000)

CPU: i.MX8MP[8] rev1.1 1600 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 35C
Reset cause: POR
Model: NXP i.MX8MPlus LPDDR4 EVK board
DRAM: 6 GiB
tcpc_init: Can't find device id=0x50
setup_typec: tcpc port2 init failed, err=-19
tcpc_init: Can't find device id=0x50
setup_typec: tcpc port1 init failed, err=-19
Core: 254 devices, 35 uclasses, devicetree: separate
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from nowhere... OK
[*]-Video Link 0adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
fail to get display timings
probe video device failed, ret -19

[0] lcd-controller@32e80000, video
[1] mipi_dsi@32e60000, video_bridge
[2] adv7535@3d, panel
adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
fail to get display timings
probe video device failed, ret -19
In: serial
Out: serial
Err: serial
SEC0: RNG instantiated
MMC: no card present
Detect USB boot. Will enter fastboot mode!
Net:
Warning: ethernet@30bf0000 (eth1) using random MAC address - 7e:80:2f:ac:63:c3

Warning: ethernet@30be0000 (eth0) using random MAC address - 9e:6c:23:7f:bd:3e
eth0: ethernet@30be0000, eth1: ethernet@30bf0000 [PRIME]
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_addr} ${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 ...
USB init failed: -22
u-boot=>

【error message(2)】
U-Boot 2024.04+g674440bc73e+p0 (Jun 06 2024 - 10:05:34 +0000)

CPU:   i.MX8MP[8] rev1.1 1600 MHz (running at 1200 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 29C
Reset cause: POR
Model: NXP i.MX8MPlus LPDDR4 EVK board
DRAM:  4 GiB
Core:  142 devices, 36 uclasses, devicetree: separate
MMC:   FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from nowhere... OK
[*]-Video Link 0imx_sec_dsim mipi_dsi@32e60000: wait tx done timeout!
Failed to set tear scanline (-16)
imx_sec_dsim mipi_dsi@32e60000: panel rm67199_panel enable backlight error -5
lcdifv3_video lcd-controller@32e80000: fail to set backlight
probe video device failed, ret -5
 
[0] lcd-controller@32e80000, video
[1] mipi_dsi@32e60000, video_bridge
[2] rm67199_panel, panel
clock is not in stop state
dsim pll config failed: -16
imx_sec_dsim mipi_dsi@32e60000: wait pkthdr tx done time out
Failed to send MCS (-16)
imx_sec_dsim mipi_dsi@32e60000: panel rm67199_panel enable backlight error -5
lcdifv3_video lcd-controller@32e80000: fail to set backlight
probe video device failed, ret -5
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
MMC: no card present
Detect USB boot. Will enter fastboot mode!
Net:   
Warning: ethernet@30bf0000 (eth1) using random MAC address - 2a:df:d8:93:a9:87
 
Warning: ethernet@30be0000 (eth0) using random MAC address - d2:ac:e2:69:cb:49
eth0: ethernet@30be0000, eth1: ethernet@30bf0000 [PRIME]
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_addr} ${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 ...

 

 

0 项奖励
回复
3 回复数

1,109 次查看
eclipse5685
Contributor I
When I check imx8mp_evk.c, it seems that index only supports being fixed at 0.

Or, if I change the driver, will it be possible to rewrite uboot on USB2(index=1) with dwc3?

static struct dwc3_device dwc3_device_data = {
#ifdef CONFIG_SPL_BUILD
.maximum_speed = USB_SPEED_HIGH,
#else
.maximum_speed = USB_SPEED_SUPER,
#endif
.base = USB1_BASE_ADDR,
.dr_mode = USB_DR_MODE_PERIPHERAL,
.index = 0,
.power_down_scale = 2,
};

int board_usb_init(int index, enum usb_init_type init)
{
int ret = 0;
 
if (index == 0 && init == USB_INIT_DEVICE) {
imx8m_usb_power(index, true);
#ifdef CONFIG_USB_TCPC
ret = tcpc_setup_ufp_mode(&port1);
if (ret)
return ret;
#endif
dwc3_nxp_usb_phy_init(&dwc3_device_data);
return dwc3_uboot_init(&dwc3_device_data);
} else if (index == 0 && init == USB_INIT_HOST) {
#ifdef CONFIG_USB_TCPC
ret = tcpc_setup_dfp_mode(&port1);
#endif
return ret;
}
 
return 0;
}
0 项奖励
回复

1,197 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

If you remove the USB type C, then uboot should be modified from the driver.

regards

0 项奖励
回复

949 次查看
radhak4x
Contributor II
Any hint on the changes, we have also disabled the TYPEC in our case and our expectation is to use usb Micro B as OTG case, and we see the same behavior and index is set to 0, and not entering to fast boot mode. do we need any changes in dts files ?
0 项奖励
回复