linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Roger Quadros <rogerq@ti.com>, Brian Norris <briannorris@chromium.org>
Cc: William Wu <william.wu@rock-chips.com>,
	gregkh@linuxfoundation.org, heiko@sntech.de,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-rockchip@lists.infradead.org, frank.wang@rock-chips.com,
	huangtao@rock-chips.com, dianders@google.com,
	briannorris@google.com, groeck@google.com,
	daniel.meng@rock-chips.com, John.Youn@synopsys.com,
	lin.huang@rock-chips.com
Subject: usb: dwc3: core: power on PHYs before initializing core
Date: Fri, 09 Mar 2018 11:01:17 +0200	[thread overview]
Message-ID: <871sgtbp2a.fsf@linux.intel.com> (raw)

Hi,

Roger Quadros <rogerq@ti.com> writes:
> Hi,
>
> On 08/03/18 18:49, Brian Norris wrote:
>> Hi,
>> 
>> On Thu, Mar 08, 2018 at 12:43:40PM +0200, Felipe Balbi wrote:
>>> William Wu <william.wu@rock-chips.com> writes:
>>>> The dwc3_core_init() gets the PHYs and initializes the PHYs with
>>>> the usb_phy_init() and phy_init() functions before initializing
>>>> core, and power on the PHYs after core initialization is done.
>>>>
>>>> However, some platforms (e.g. Rockchip RK3399 DWC3 with Type-C
>>>> USB3 PHY), it needs to do some special operation while power on
>>>> the Type-C PHY before initializing DWC3 core. It's because that
>>>> the RK3399 Type-C PHY requires to hold the DWC3 controller in
>>>> reset state to keep the PIPE power state in P2 while configuring
>>>> the Type-C PHY, otherwise, it may cause waiting for the PIPE ready
>>>> timeout. In this case, if we power on the PHYs after the DWC3 core
>>>> initialization is done, the core will be reset to uninitialized
>>>> state after power on the PHYs.
>>>>
>>>> Fix this by powering on the PHYs before initializing core. And
>>>> because the GUID register may also be reset in this case, so we
>>>> need to configure the GUID register after powering on the PHYs.
>>>>
>>>> Signed-off-by: William Wu <william.wu@rock-chips.com>
>>>
>>> does this cause any regressions for your boards?
>> 
>> I'm not Roger, but I believe it was determined we don't need this for
>> the Rockchip systems for which William was originally sending this. At
>> least not right now. I believe our PHY init problems were mostly
>> resolved in other ways.
>> 
>> (Although I hear USB is currently pretty broken around suspend/resume
>> for us on -next. Likely unrelated.)
>> 
>> I guess we never clearly replied stating the above. I hope this isn't
>> merged anywhere? Or I guess it's no problem to me at the moment, but it
>> might be needless churn.
>> 
>
> I did some quick tests on TI platforms and didn't see any issues with this patch.
> Since this patch isn't really fixing your problem and we didn't have any
> problems to start with I'd suggest to avoid this churn for now.

fair enough, I won't apply it :-)

             reply	other threads:[~2018-03-09  9:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09  9:01 Felipe Balbi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-03-09  8:54 usb: dwc3: core: power on PHYs before initializing core Roger Quadros
2018-03-08 16:49 Brian Norris
2018-03-08 10:43 Felipe Balbi
2018-01-18 16:51 Enric Balletbo Serra
2018-01-17 21:46 Brian Norris
2018-01-12  4:00 William Wu

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=871sgtbp2a.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=John.Youn@synopsys.com \
    --cc=briannorris@chromium.org \
    --cc=briannorris@google.com \
    --cc=daniel.meng@rock-chips.com \
    --cc=dianders@google.com \
    --cc=frank.wang@rock-chips.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=groeck@google.com \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=lin.huang@rock-chips.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rogerq@ti.com \
    --cc=william.wu@rock-chips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).