Ethernet Gadget on STM32MP1 not working

Patrice CHOTARD patrice.chotard at
Fri Apr 2 14:20:33 CEST 2021

Hi Herbert

I will have a look at this issue.
Thanks for the  information and start of debug.


De : Herbert Poetzl <herbert at>
Envoyé : jeudi 1 avril 2021 12:58
À : u-boot at <u-boot at>
Cc : Patrick DELAUNAY <patrick.delaunay at>; Patrice CHOTARD <patrice.chotard at>
Objet : Ethernet Gadget on STM32MP1 not working

When testing the USB Ethernet Gadget I encountered some
issues on STM32MP1 which prevented the bind to work as

Basically running ...

 bind /soc/usb-otg at 49000000 usb_ether

... results in an additional entry in 'dm uclass' like:

 uclass 104: usb
 0   usb-otg at 49000000 @ ddf2f458, seq 0
 1   usb-otg at 49000000 @ ddf39de0, seq 1
 2   usb-otg at 49000000 @ ddf3a188, seq 2

... but no working ethernet gadget.

Marek Vasut tracked the issue down to commit
84f8e36f03fafa7e2e2ff822db90fefa6bd5f350 which when
reverted allows to get one step further ...

drivers/usb/gadget/ether.c:2064-eth_bind() controller 'dwc2-udc' not recognizeddrivers/usb/gadget/udc/udc-core.c:317-udc_bind_to_driver() failed to start <NULL>: -19

... and finally when commenting out the

 return -ENODEV;

... in drivers/usb/gadget/ether.c line 2066, the
ethernet gadget finally works on STM32MP1.

Hope this helps,

More information about the U-Boot mailing list