linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jwerner@google.com (Julius Werner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 4/4] phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800
Date: Wed, 10 Sep 2014 13:22:44 -0700	[thread overview]
Message-ID: <CAODwPW9QOD-7Wyc1Bh8QKfArSmsdqzYTOx6-gc8V5ace9-oPFQ@mail.gmail.com> (raw)
In-Reply-To: <CAFp+6iErXKpXgE0tRPB=tEqXxcXgQAeFJP1TpSwRN6fNu9a-qw@mail.gmail.com>

>> 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. (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-10 20:22 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 [this message]
2014-09-11  3:20                                 ` Vivek Gautam
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=CAODwPW9QOD-7Wyc1Bh8QKfArSmsdqzYTOx6-gc8V5ace9-oPFQ@mail.gmail.com \
    --to=jwerner@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).