Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755696AbcC2Cgg (ORCPT ); Mon, 28 Mar 2016 22:36:36 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:38008 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755587AbcC2Cga (ORCPT ); Mon, 28 Mar 2016 22:36:30 -0400 X-Sasl-enc: WkKanRAsxLq1HQ8YTJzkEAn2ehnG9mmye4mSeaWEmqzX 1459218987 Date: Mon, 28 Mar 2016 19:36:25 -0700 Message-Id: From: John Youn To: linux-usb@vger.kernel.org To: Doug Anderson Cc: johnyoun@synopsys.com Cc: Felipe Balbi Cc: Stefan Wahren Cc: Michael Niewoehner Cc: Tao Huang Cc: Julius Werner Cc: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: Caesar Wang Cc: Heiko Stuebner Cc: Felipe Balbi Cc: Remi Pommarel Cc: Kever Yang Cc: Przemek Rudy Subject: [RFT PATCH 0/4] usb: dwc2: Fix core reset and force mode delay problems Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1489 Lines: 44 Hi, The following patch series addresses the core reset and force mode delay problems we have been seeing on dwc2 for some platforms. I think I have identified the source of the inconsistencies between platforms and this series attempts to address them. Basically everything stems from the IDDIG debounce filter delay, which is a function of the PHY clock speed and can range from 5-50 ms if enabled. This delay must be taken into account on core reset and force modes. A full explanation is provided in the patch commit log and code comments. The first two patches are prerequisites to the force mode fixes, including one patch that was sent separately by Przemek Rudy. I have resubmitted it with this series for convenience. Please help by reviewing and testing on your platforms. Patches were tested on: * Synopsys HAPS platform IP 3.20a OTG, dr_mode=OTG,HOST,PERIPHERAL Regards, John John Youn (3): usb: dwc2: gadget: Only initialize device if in device mode usb: dwc2: Add delay to core soft reset usb: dwc2: Properly account for the force mode delays Przemek Rudy (1): usb: dwc2: do not override forced dr_mode in gadget setup drivers/usb/dwc2/core.c | 195 ++++++++++++++++++++++++++++---------------- drivers/usb/dwc2/core.h | 2 +- drivers/usb/dwc2/gadget.c | 30 +++++-- drivers/usb/dwc2/hcd.c | 6 +- drivers/usb/dwc2/hw.h | 1 + drivers/usb/dwc2/platform.c | 9 +- 6 files changed, 161 insertions(+), 82 deletions(-) -- 2.7.4