From patchwork Fri May 25 09:32:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 920360 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="tg2uz/uM"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40sh2P2NrDz9s08 for ; Fri, 25 May 2018 19:35:57 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id DE93EC21DDC; Fri, 25 May 2018 09:33:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id CCECBC21DFF; Fri, 25 May 2018 09:32:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 342C2C21C2F; Fri, 25 May 2018 09:32:53 +0000 (UTC) Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by lists.denx.de (Postfix) with ESMTPS id 0127EC21BE5 for ; Fri, 25 May 2018 09:32:51 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4P9Wj1F030530; Fri, 25 May 2018 04:32:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1527240765; bh=b+RmMCu0lQXIZhFr/OX7o8LUInPOhRQNs9Wb6riSzBc=; h=From:To:CC:Subject:Date; b=tg2uz/uMbbdCzzzwfB6RgYhfX1ksp9xq25l/8KqmNaIfXGCbGPRJn8ekfedhQFR8T MphyuyvRY2V8ian7Ms/p5vYEGh7QtjVKPHc3RSWQjrcmIrDVjmUHiBRZ5vHV3hrI1x WEdKwVMtfqkOraaDllwEvC4J67hk55v5+7OwMjp8= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4P9Wi4r005066; Fri, 25 May 2018 04:32:44 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 25 May 2018 04:32:44 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Fri, 25 May 2018 04:32:44 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4P9Whv5030099; Fri, 25 May 2018 04:32:44 -0500 From: Jean-Jacques Hiblot To: , Date: Fri, 25 May 2018 11:32:35 +0200 Message-ID: <1527240762-27114-1-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: Stefan Agner , u-boot@lists.denx.de, Fabio Estevam Subject: [U-Boot] [PATCH v1 0/7] Improvements for the dwc3_generic driver X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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. 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' Jean-Jacques Hiblot (7): 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 dwc3-generic: Handle the PHYs, the clocks and the reset lines dwc3-generic: Add select_dr_mode operation 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 +- drivers/usb/Kconfig | 6 ++ drivers/usb/dwc3/Kconfig | 7 +- drivers/usb/dwc3/core.c | 86 +++++++++++++++- drivers/usb/dwc3/dwc3-generic.c | 206 +++++++++++++++++++++++++++++--------- 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 | 93 ++--------------- include/dwc3-uboot.h | 7 ++ include/linux/usb/gadget.h | 18 ++++ 16 files changed, 348 insertions(+), 184 deletions(-)