From: Felipe Balbi <balbi@kernel.org>
To: Todor Tomov <todor.tomov@linaro.org>
Cc: Roger Quadros <rogerq@ti.com>,
linux-usb@vger.kernel.org, vigneshr@ti.com,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
"linux-stable # = v4 . 13" <stable@vger.kernel.org>
Subject: [v2,RESEND] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume
Date: Tue, 27 Nov 2018 10:59:43 +0200 [thread overview]
Message-ID: <8736rm28w0.fsf@linux.intel.com> (raw)
Hi,
Todor Tomov <todor.tomov@linaro.org> writes:
>>>>> 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.
That's the correct way, yes.
Thanks
WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@kernel.org>
To: Todor Tomov <todor.tomov@linaro.org>
Cc: Roger Quadros <rogerq@ti.com>,
linux-usb@vger.kernel.org, vigneshr@ti.com,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
"linux-stable # \= v4 . 13" <stable@vger.kernel.org>
Subject: Re: [PATCH v2 RESEND] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume
Date: Tue, 27 Nov 2018 10:59:43 +0200 [thread overview]
Message-ID: <8736rm28w0.fsf@linux.intel.com> (raw)
In-Reply-To: <ca6e775c-98ce-abab-56e1-e40e673dd111@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]
Hi,
Todor Tomov <todor.tomov@linaro.org> writes:
>>>>> 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.
That's the correct way, yes.
Thanks
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next reply other threads:[~2018-11-27 8:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 8:59 Felipe Balbi [this message]
2018-11-27 8:59 ` [PATCH v2 RESEND] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume Felipe Balbi
-- strict thread matches above, loose matches on Subject: below --
2018-11-26 17:14 [v2,RESEND] " Todor Tomov
2018-11-26 17:14 ` [PATCH v2 RESEND] " Todor Tomov
2018-11-26 8:27 [v2,RESEND] " Todor Tomov
2018-11-26 8:27 ` [PATCH v2 RESEND] " Todor Tomov
2018-11-16 17:01 [v2,RESEND] " Todor Tomov
2018-11-16 17:01 ` [PATCH v2 RESEND] " Todor Tomov
2018-11-15 8:09 [v2,RESEND] " Felipe Balbi
2018-11-15 8:09 ` [PATCH v2 RESEND] " Felipe Balbi
2018-11-14 16:11 [v2,RESEND] " Todor Tomov
2018-11-14 16:11 ` [PATCH v2 RESEND] " Todor Tomov
2018-02-12 13:30 [v2,RESEND] " Roger Quadros
2018-02-12 13:30 ` [PATCH v2 RESEND] " Roger Quadros
2018-02-12 8:45 [v2] " Felipe Balbi
2018-02-12 8:45 ` [PATCH v2] " Felipe Balbi
2018-01-11 10:38 [v2] " Roger Quadros
2018-01-11 10:38 ` [PATCH v2] " Roger Quadros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8736rm28w0.fsf@linux.intel.com \
--to=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rogerq@ti.com \
--cc=stable@vger.kernel.org \
--cc=todor.tomov@linaro.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.