Serial console via USB on U-boot error

Chema Casillas Mora carlos.mora at nxp.com
Sat Sep 21 04:28:46 CEST 2024


Hi U-boot team,

We have realized that, on NXP i.MX93-EVK, when switching the console to usb:

u-boot=> setenv stdin usbacm; setenv stdout usbacm; setenv stderr usbacm

On a Linux host the gadget is detected-

Bus 003 Device 101: ID 1fc9:0134 NXP Semiconductors USB download gadget

However, Linux dmesg host shows an error.

[1138006.159559] usb 3-1: new high-speed USB device number 101 using
xhci_hcd
[1138006.309162] usb 3-1: config 1 interface 1 altsetting 0 has a duplicate
endpoint with address 0x81, skipping
[1138006.310989] usb 3-1: New USB device found, idVendor=1fc9,
idProduct=0134, bcdDevice= 2.21
[1138006.311004] usb 3-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[1138006.311011] usb 3-1: Product: USB download gadget
[1138006.311029] usb 3-1: Manufacturer: FSL
[1138006.311033] usb 3-1: SerialNumber: e6a3c0352fb31ff6
[1138006.314521] cdc_acm: probe of 3-1:1.0 failed with error -22

I checked that endpoints are misconfigured. For a CDC device, configuration
1 has one IN interrupt endpoint, and configuraton 2 has two bulk endpoints
(IN/OUT). Although they are set on that way, for U-boot implementation was
using EP1_IN for both configurations. This issue is also present on
iMX8MM-EVK as well since it uses the Chipidea (CI) USB IP (same as iMX93).

Attached is a patch containing the fix for this issue which adds a specific
case for CI USB in the usb_ep_autoconfig function so that the endpoint's
name of the USB IP matches with the corresponding USB endpoint descriptor. 

CONFIG_CI_UDC needs to be set to 'y' for this fix to work, as it makes use
of the gadget_is_ci  macro to identify the USB IP.

 We are sending this email since the epautoconf.c file is part of the uboot
code.

Is there are additional specific requirements to request integrating this
patch into U-Boot code?

Thanks in advance and best regards!

/Carlos

 

 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mypatch1.diff
Type: application/octet-stream
Size: 1009 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240921/8b327480/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 9806 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240921/8b327480/attachment.bin>


More information about the U-Boot mailing list