From: Herbert Poetzl Date: Thu, 1 Apr 2021 12:58:06 +0200 Subject: Ethernet Gadget on STM32MP1 not working Message-ID: <20210401105806.GN14419@MAIL.13thfloor.at> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When testing the USB Ethernet Gadget I encountered some issues on STM32MP1 which prevented the bind to work as expected. 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 : -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, Herbert