Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932354AbcDGSmL (ORCPT ); Thu, 7 Apr 2016 14:42:11 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:58147 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932149AbcDGSmI (ORCPT ); Thu, 7 Apr 2016 14:42:08 -0400 Subject: Re: [RFT PATCH 0/4] usb: dwc2: Fix core reset and force mode delay problems To: Michael Niewoehner , John Youn References: <01515703-AA78-4E38-9F73-B5D491C2DF7F@mniewoehner.de> From: John Youn CC: "linux-usb@vger.kernel.org" , Doug Anderson , Stefan Wahren , Tao Huang , Julius Werner , "Greg Kroah-Hartman" , "linux-kernel@vger.kernel.org" , Caesar Wang , Heiko Stuebner , Felipe Balbi , "Remi Pommarel" , Kever Yang , "Przemek Rudy" Message-ID: <5706A9F4.2000800@synopsys.com> Date: Thu, 7 Apr 2016 11:41:56 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <01515703-AA78-4E38-9F73-B5D491C2DF7F@mniewoehner.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.9.139.55] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2359 Lines: 72 On 3/31/2016 2:44 PM, Michael Niewoehner wrote: > Hi John, > > Am 29.03.2016 um 04:36 schrieb John Youn : > >> 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 >> > > after applying your patch series on v4.6-rc1 usb keeps being broken on rk3188. > Besides that I get "dwc2 10180000.usb: dwc2_wait_for_mode: Couldn't set host mode“ repeatedly. > > Currently this works for me: > - Revert "usb: dwc2: Fix probe problem on bcm2835“ > - Apply "usb: dwc2: Add a 10 ms delay to dwc2_core_reset()" > > > Best regards > Michael > Thanks Michael. I won't be able to look at this again until next week. In the meantime could you provide a driver log? In particular I want to see the values of your GHWCFG registers, and where you are seeing the dwc2_wait_for_mode() failure. Regards, John