Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp170920imu; Mon, 26 Nov 2018 09:20:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/XOOiCZ/l9hqVk/J+03CmtgWdoNNWxvZ/UGmW8wxyhgsUcquFVFbGgKOwm4aCBDV6VojjPa X-Received: by 2002:a63:c447:: with SMTP id m7mr25653498pgg.27.1543252842938; Mon, 26 Nov 2018 09:20:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543252842; cv=none; d=google.com; s=arc-20160816; b=m+Lr6/dRMGvXAExov6Xa7j2Bthi9tMlsgD/emva80PhsJF1bJ7RZWdsxcAJROlHzz6 /RUExyvy8XFadGZeCJ5PkujihLqjQxcXBT4dDlKIqcRghh2RzOsXQSM05lp3K5G2uw7c eKJh1wWip7yMGrrK6Ytu13+D5lcbBJY33qWdc3ymg+xvGOpnOdwxxA9iUMFpyTe50ozs PZvvzSBYDM+ERZoxwA+q7Wb9D1UKWnSKO6hIpl5jBJTw4Gv0Th7Hr789RPSdeWzrMc5Q z5Oc85zlskPx0ZBc9t3NVoisrvRXg1ZLjSE9ilvTdrMPC7xqH/1QG9h5Wkf+SFlXrrkD UEow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=mF6QLMm9W8rvCicDMkzdJM95rye+1tmDZYbb3Dmgi8A=; b=PAltUlroUIh0cVLkucESRCdIFlk/Un0J6UVjmqMnHw4mX0caAlhpaTFta5daz09Nh6 nq+jWqeHhgfaQ49k7+EvPvAzWLxoGxUNeHVuCdm37fJLGCo54Mz8ca1ue3Yz6db5Nos7 a+r7kbo1b/AP9zTCoIuNWIwN/07cynxTR1xXlmThk9b7mk9fsVAZ9T9gbtk7CdJo0Ray Z0F5UqxfOCB9OLOB8aD4MfRxWX2u5uyANcvgC8RUcFGV67p4Er7MiCEPIK+qlB6CxXpB jgIuoegoJxiQ9OBy2QRu8crrVt1+DDTAJSLfFyaMmNTUXKkwtm6c6JTJE43gYqvqrAWH hJ+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fRfdVFbf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5si821909pgc.369.2018.11.26.09.19.09; Mon, 26 Nov 2018 09:20:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fRfdVFbf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726771AbeK0EJS (ORCPT + 99 others); Mon, 26 Nov 2018 23:09:18 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38409 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726254AbeK0EJR (ORCPT ); Mon, 26 Nov 2018 23:09:17 -0500 Received: by mail-wr1-f66.google.com with SMTP id v13so16312456wrw.5 for ; Mon, 26 Nov 2018 09:14:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mF6QLMm9W8rvCicDMkzdJM95rye+1tmDZYbb3Dmgi8A=; b=fRfdVFbfIrjyrr4JiHtLA4KaBuG0TUq6BNiAvOAIFBfQFejyZByS8tXdttfMBPFFSA 6tnbwmNGde+/Q7FgZdWG8I7kep2Fr97aPuj4UY3AxGuEZ7xcjPWvdNWZLHcBFlQlYD5f u31OMvu1k3xyVjjpZbmDfVmBNf1CXk0X+Gc8w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mF6QLMm9W8rvCicDMkzdJM95rye+1tmDZYbb3Dmgi8A=; b=MV7ZTQgBLNFQg6mbq0MA0JB2ItKJPr9deS6d/y5e98HkCULe9q+0IF9futLBmzOCon Incp+plrgrF2p5bznyGuJbAJVL/EtK1qIForFAiHbb/OQf0lASGfwIU7olBdb6dPJy2v 6I3b0PrFf8yX8gVDjsGEGxMOZ+zSRzT5SFDsJnljb/lCFdei7GK83wQcAyLWO6frJ2wX PyPldlDDUfDCeZ79C1VrsrrVowplq/BuxZ+yS+UVPMIAH48p3p4maXPBmFZSo3T/1IdA 8KZh4ZC5+ub1g47HhbYXC10CGfK/NpVXI7r6G2nTXqbMtkGGoiT7bca2rdpbIBNCzwBG l9GA== X-Gm-Message-State: AA+aEWYep2xzJXnuEG0iSSQtsNwfXEFUuY+DqxcuZxHAIINHd34yPKA+ A2UXnpw3qHANOCs8+5phseiW8g== X-Received: by 2002:adf:b502:: with SMTP id a2mr18222514wrd.264.1543252471382; Mon, 26 Nov 2018 09:14:31 -0800 (PST) Received: from [192.168.27.197] ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id v133sm1938755wmd.4.2018.11.26.09.14.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 09:14:26 -0800 (PST) Subject: Re: [PATCH v2 RESEND] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume From: Todor Tomov To: Felipe Balbi Cc: Roger Quadros , linux-usb@vger.kernel.org, vigneshr@ti.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, "linux-stable # = v4 . 13" References: <1515667087-4110-1-git-send-email-rogerq@ti.com> <606dbc68-2014-8590-ce47-83c175d4cd41@linaro.org> <87efbm92zi.fsf@linux.intel.com> <027608c0-8d2d-42ab-5125-76b86f286d2b@linaro.org> <08ebcaea-45c4-d277-9585-97045960e83a@linaro.org> Message-ID: Date: Mon, 26 Nov 2018 19:14:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <08ebcaea-45c4-d277-9585-97045960e83a@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Felipe, On 26.11.2018 10:27, Todor Tomov wrote: > Hi Felipe, > > On 16.11.2018 19:01, Todor Tomov wrote: >> Hi, >> >> On 15.11.2018 10:09, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Todor Tomov writes: >>> >>>> Hello, >>>> >>>> After I apply this patch on 4.14 (or receive it with 4.14.70) I see a regression with >>>> the Qualcomm QUSB2 phy driver. I'm testing on a Dragonboard 820c. >>>> In boot log I get: >>>> >>>> [ 4.525502] phy phy-7412000.phy.6: QUSB2PHY pll lock failed: status reg = 0 >>>> [ 4.529232] phy phy-7412000.phy.6: phy init failed --> -16 >>>> [ 4.536170] dwc3 7600000.dwc3: failed to initialize core >>>> [ 4.541743] dwc3: probe of 7600000.dwc3 failed with error -16 >>>> [ 4.549979] phy phy-7411000.phy.5: QUSB2PHY pll lock failed: status reg = 0 >>>> [ 4.552843] phy phy-7411000.phy.5: phy init failed --> -16 >>>> [ 4.559606] dwc3 6a00000.dwc3: failed to initialize core >>>> [ 4.565181] dwc3: probe of 6a00000.dwc3 failed with error -16 >>>> >>>> I can provide a full log if needed. >>> >>> please do. Also, try mainline and let us know if the problem >> >> This is the full log on 4.14.69 + this patch: https://paste.ubuntu.com/p/N5WdHw47QC/ >> I also managed to get a log from 4.20.0-rc2 and I see the same error: https://paste.udwc3_phy_setupbuntu.com/p/jz6fvYyZh6/ >> >>> persists. Why do you get -EBUSY from the PHY driver? >> >> Maybe I could have proposed a fix if I knew but I don't know. > > I have done some debugging but I still cannot understand it completely. > > What I see is that if the PHY interface is configured first (dwc3_phy_setup) > then the PHY init (qusb2_phy_init called by dwc3_core_soft_reset) fails > with "pll lock failed". If we move dwc3_phy_setup after dwc3_core_soft_reset > as it was before this patch, it works. I have found that during dwc3_phy_setup the PHY interface is configured to suspend and this is what breaks the QUSB2 PHY initialization. It seems that it can be fixed by adding the "snps,dis_u2_susphy_quirk" quirk in device tree. If this approach proves correct, I'll send the patch upstream. Best regards, Todor > > Do you have any ideas why this happens or how to solve it? > > Thank you. > Best regards, > Todor >