[PATCH v3 00/14] usb: dwc2: Add host and gadget driver

Sascha Hauer s.hauer at pengutronix.de
Mon Aug 10 16:23:42 EDT 2020


Hi Jules,

On Tue, Jul 21, 2020 at 02:05:46PM +0200, Jules Maselbas wrote:
> This patchset add USB host and gadget support for the DWC2 controller
> The host driver is ported from the U-Boot driver, some part are taken
> taken from Linux.
> 
> The gadget driver is ported from Linux and only support direct dma (not
> descriptor based) and does not support direct buffer although this could
> be nice to have.
> 
> changes since v2:
>  - rework timeout handling for networking
>  - use usb_register_otg_device
>  - rework gadget fifo allocation
>  - modified makefile/kconfig for host or gadget only

Most important thing first: I tested this on a rpi3b and it works \o/

There's one thing missing though which you removed along with the old
driver. in probe() you need to set dev->detect to a function which calls
usb_host_detect(), see dwc2_detect() in the old driver. This is
necessary to let barebox detect the usb devices automatically when
needed, i.e. detect -a should result in USB devices being detected.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list