mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vivek Gautam <gautam.vivek@samsung.com>
To: Julius Werner <jwerner@google.com>, Felipe Balbi <balbi@ti.com>
Cc: Julius Werner <jwerner@chromium.org>,
	Linux USB Mailing List <linux-usb@vger.kernel.org>,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Greg KH <gregkh@linuxfoundation.org>, kishon <kishon@ti.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Jingoo Han <jg1.han@samsung.com>,
	abrestic@chromium.org
Subject: Re: [PATCH v6 4/4] phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800
Date: Thu, 11 Sep 2014 08:50:30 +0530	[thread overview]
Message-ID: <7AFBEAB40137492BBF4D80EBC3E6EBB3@sisodomain.com> (raw)
In-Reply-To: <CAODwPW9QOD-7Wyc1Bh8QKfArSmsdqzYTOx6-gc8V5ace9-oPFQ@mail.gmail.com>


Hi,


On Thursday, September 11, 2014 1:52 AM, "Julius Werner" 
<jwerner@google.com> wrote


>>> right, use that to call phy_init() at the right time, then you need to
>>> add a new ->calibrate() method which, likely, will only be used by you
>>> ;-)
>
>> so you mean, the xhci should itself call phy_init() at a time suitable,
>> so that ->calibrate() is not required at all ?
>
> I'm not sure if that's a good idea because it would require phy_init()
> and calibrate() to always mean the same thing. The calibrate() for
> Exynos5420 needs to be called both during boot and after system
> resume, but there might be other platforms that don't want to
> completely shutdown and reinit their PHYs during suspend/resume with
> the same functions used for boot. For example, Tegra5 (proposed driver
> at http://www.spinics.net/lists/linux-usb/msg113093.html) can
> power-gate the PHY during suspend, but that's not running the same
> code as in the phy_init()/phy_shutdown() methods (the posted patch
> doesn't contain all power-gating code yet, but you can get an idea
> about how it has to work from
> https://chromium.googlesource.com/chromiumos/third_party/kernel-next/+/chromeos-3.10/drivers/usb/host/xhci-tegra.c).
> It would also mean that the initial phy_init() call must always come
> after the XHCI reset, and I am not sure if that would fit nicely with
> all platforms.
>
>> right, and what's more generic than adding the support for PHYs straight 
>> into xHCI ?
>
> Well, if we are going to have a calibrate() method (as in "stuff the
> PHY does after every controller reset if it needs to"), we have to add
> it either to the XHCI stack or the USB core.
> I thought the USB core would be more generic, because in theory it's 
> possible that e.g. an
> EHCI controller might have a similar requirement.

Atleast on Exynos systems I can see that unless PHY is initialized the 
controller
fails to reset. So taking a path wherein we initialize the PHYs after 
controller resets
is not going to help us generically across all controllers.
With XHCI though things are OK while resetting, and we can initialize the 
PHYs
after controller reset happens but here too DWC3 is already initializing the 
PHYs
for exynos systems too, so it may not be very wise to do that initialization 
stuff
once again. Plus the PHY core prevents multiple initialization anyways.

> (Also, we have the gen_phy pointer in a USB core structure (struct 
> usb_hcd), so I thought
> making this feature generic to the USB core and thus available to all
> kinds of host controllers would be more natural.) 


  reply	other threads:[~2014-09-11  3:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 11:12 [PATCH v6 0/4] Fine tune USB 3.0 PHY on exynos5420 Vivek Gautam
2014-09-02 11:12 ` [PATCH v6 1/4] phy: Add provision for calibrating phy Vivek Gautam
2014-09-02 11:12 ` [PATCH v6 2/4] usb: host: xhci-plat: Get PHYs for xhci's hcds Vivek Gautam
2014-09-02 11:12 ` [PATCH v6 3/4] usb: hcd: Calibrate PHY post hcd reset Vivek Gautam
2014-09-02 11:12 ` [PATCH v6 4/4] phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800 Vivek Gautam
2014-09-02 14:34   ` Felipe Balbi
2014-09-03  7:29     ` Vivek Gautam
2014-09-03 14:42       ` Felipe Balbi
2014-09-04  6:31         ` Vivek Gautam
2014-09-05 17:56           ` Felipe Balbi
2014-09-08  4:23             ` Vivek Gautam
2014-09-08 13:44               ` Felipe Balbi
2014-09-09  1:49                 ` Vivek Gautam
2014-09-09 14:42                   ` Felipe Balbi
2014-09-10  3:37                     ` Vivek Gautam
2014-09-10  3:39                       ` Vivek Gautam
2014-09-10  4:53                         ` Felipe Balbi
2014-09-10  5:23                           ` Vivek Gautam
2014-09-10  7:56                             ` Vivek Gautam
2014-09-10 20:22                               ` Julius Werner
2014-09-11  3:20                                 ` Vivek Gautam [this message]
2014-09-11 15:40                               ` Kishon Vijay Abraham I
2014-09-11 16:54                                 ` Felipe Balbi

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=7AFBEAB40137492BBF4D80EBC3E6EBB3@sisodomain.com \
    --to=gautam.vivek@samsung.com \
    --cc=abrestic@chromium.org \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jg1.han@samsung.com \
    --cc=jwerner@chromium.org \
    --cc=jwerner@google.com \
    --cc=kgene.kim@samsung.com \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®