From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Jacques Hiblot Date: Tue, 25 Sep 2018 11:03:15 +0200 Subject: [U-Boot] [PATCH v3 0/8] Improvements for the dwc3_generic driver Message-ID: <1537866203-7717-1-git-send-email-jjhiblot@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This series aims at bringing improvements to the dwc3_generic driver so that it can be used by most of the platforms using the dwc3 controller. I tested this on with DRA7 and AM57x platforms for both Peripheral and Host operations. The code to enable DM USB host & dev support for those platforms will be submitted in a separate series. Michal Simek has tested this series: " I have tested it on zcu100 with usb stick, usb to ethernet converter and also dfu. Tested-by: Michal Simek " Enhancements: - use separate Kconfig option for DM USB Periphal and DM USB Host. This allow platforms to keep their non-DM USB peripheral code and use the DM USB host. - fixes the bind/probe confusion in dwc3_generic. The probe is done when the USB device is first needed. - handles PHYs when in the peripheral mode. The code to handle the PHYs is shared with the host side - handles clock and reset - bind host controller to the more generic driver 'xhci-dwc3' Changes in v3: - fixes bug dwc3_setup_phy(): the phy arrays wasn't returned. This was visible only when the device is removed. - Stub the DWC3 PHY operations if CONFIG_IS_ENABLED(PHY) is false. This fixes all build issues but one (evb-rk3328). - Fix build issue with evb-rk3328 by enabling CONFIG_USB_DWC3. This has little impact on the footprint and should not break the runtime as the xhci-rockchip driver has its own probe function. Nevertheless this was !!! NOT TESTED !!! by lack of hw Changes in v2: - Updated commit log - Fixed typo in thordown.c - select DM_USB_DEV by default for zynqmp platforms Jean-Jacques Hiblot (8): usb: gadget: Do not call board_usb_xxx() directly in USB gadget drivers usb: introduce a separate config option for DM USB device usb: udc: implement DM versions of usb_gadget_initialize()/_release()/_handle_interrupt() dwc3_generic: do not probe the USB device driver when it's bound dwc3: move phy operation to core.c configs: evb-rk3328: Enable CONFIG_USB_DWC3 dwc3-generic: Handle the PHYs, the clocks and the reset lines dwc3-generic: Add select_dr_mode operation arch/arm/Kconfig | 2 + cmd/fastboot.c | 4 +- cmd/rockusb.c | 4 +- cmd/thordown.c | 4 +- cmd/usb_gadget_sdp.c | 4 +- cmd/usb_mass_storage.c | 4 +- common/dfu.c | 6 +- configs/evb-rk3328_defconfig | 1 + drivers/usb/Kconfig | 6 ++ drivers/usb/dwc3/Kconfig | 7 +- drivers/usb/dwc3/core.c | 89 +++++++++++++++- drivers/usb/dwc3/dwc3-generic.c | 207 +++++++++++++++++++++++++++++--------- drivers/usb/dwc3/ep0.c | 1 - drivers/usb/gadget/ether.c | 38 +------ drivers/usb/gadget/udc/udc-core.c | 44 +++++++- drivers/usb/host/xhci-dwc3.c | 95 ++--------------- include/dwc3-uboot.h | 19 ++++ include/linux/usb/gadget.h | 18 ++++ 18 files changed, 367 insertions(+), 186 deletions(-) -- 2.7.4