From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: David Cohen <david.a.cohen@linux.intel.com>
Cc: Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Baolu Lu <baolu.lu@linux.intel.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Kishon Vijay Abraham I <kishon@ti.com>
Subject: Re: [PATCH 8/8] phy: add driver for TI TUSB1210 ULPI PHY
Date: Mon, 2 Feb 2015 14:50:30 +0200 [thread overview]
Message-ID: <20150202125030.GA30962@kuha.fi.intel.com> (raw)
In-Reply-To: <20150130160959.GA20689@psi-dev26.jf.intel.com>
Hi David,
> > > > > What exactly are we breaking here? The USB on BYT-CR does not work yet
> > > > > with the mainline kernel, or does it? To enable it, I already
> > > > > suggested the BYT quirk (attached again).
> > >
> > > It used to work with mainline with minor restrictions. It stopped
> > > working (and I failed to catch it during patch review) when NOP phy
> > > enumeration was removed from dwc3-pci.c (but my understanding is that
> > > Felipe is expecting to add it back as default phy in case no phy is
> > > found by dwc3).
> > >
> > > BYT-CR worked well except for operations that needed to access phy's
> > > registers via ULPI bus (e.g. eye optimization). But to power on i.e.
> > > TUSB1210 all you need it to toggle GPIOs, which is done by generic phy.
> > > The need for ULPI bus was to complement this missing features, but
> > > instead we're breaking BYT-CR :/
> >
> > So what you are saying that if I get one of those devices you
> > mentioned and try vanilla kernel on it, the USB will work without any
> > modifications to the kernel?
>
> You're misunderstanding BYT-CR SoC and external board components. The
> only reason that prevents most of BYT-CR boards' USB device work
> out-of-the-box is a switch device muxing D+/D- between host and device
> controllers (they depend on a single GPIO level to be toggled to get USB
> device working). I started discussion on how to upstream this case, but
> this is board related, not BYT-CR related. Some boards have also an i2c
> switch which requires extra i2c driver to get USB device working. But it
> doesn't mean the phy/otg controllers aren't fully functional with dwc3 +
> generic phy drivers.
OK, so after we add driver for the mux, are you saying that USB device
mode works without need for any patches to dwc3 or the nop phy driver
for example with v3.18?
In the code that we had in v3.18, the nop phy platform data had the
reset gpio value set to -1 (invalid) by the dwc3-pci, so there was
nothing toggling the reset gpio yet and the cs gpio was not handled at
all. So unless you are saying we don't need to toggle the gpios before
the USB became operational, you would have had to patch both dwc3-pci
and phy-generic in order to get it operational. And of course if we
didn't need to toggle them, there would not be any need for the nop
phy at all.
> FWIW if you test a board without such switch (e.g. a reference BYT-T
> board called FFRD8 - BYT-CR is a derivation of BYT-T) it will work
> out-of-the-box.
And it continues to work out-of-the-box even after we removed the
creation of the PHY platform device because it does not need to
toggle the gpios, right?
BYT-T boards are actually one of the reason why we would really need
the ulpi bus, because most them have tusb1211 (so not tusb1210) as the
phy and they use it to detect the charger among other things.
> You missed my question. Have you tried to remove and reload dwc3 and phy
> modules with your test case?
I do test unloading all the modules and reloading them back every
time, and with the hack I suggested everything works just fine.
> > We really can't go back to what we had. Please keep in mind that it
> > tied us to the USB PHY framework, possibly forever, and we shouldn't
> > have to depend on two different PHY frameworks. If we have to register
> > the PHY device in dwc3-pci.c then you should create new nop phy for
> > the generic phy framework and use that instead. But before you do
> > that, we better be damn sure there is no way to make ulpi bus work,
> > and we are not there yet.
>
> You have a point. But the transition should happen without creating
> regressions. You cannot remove previous design while we don't have the
> next one merged and functional.
But I still don't see any regressions?
Thanks,
--
heikki
next prev parent reply other threads:[~2015-02-02 12:50 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 15:12 [PATCH 0/8] usb: ulpi bus Heikki Krogerus
2015-01-23 15:12 ` [PATCH 1/8] usb: add bus type for USB ULPI Heikki Krogerus
2015-01-29 5:02 ` Felipe Balbi
2015-01-29 14:18 ` Heikki Krogerus
2015-02-13 1:44 ` Stephen Boyd
2015-02-13 11:24 ` Heikki Krogerus
2015-01-23 15:12 ` [PATCH 2/8] usb: dwc3: USB2 PHY register access bits Heikki Krogerus
2015-01-23 15:12 ` [PATCH 3/8] usb: dwc3: store driver data earlier Heikki Krogerus
2015-01-23 15:12 ` [PATCH 4/8] usb: dwc3: cache hwparams earlier Heikki Krogerus
2015-01-23 15:12 ` [PATCH 5/8] usb: dwc3: ULPI or UTMI+ select Heikki Krogerus
2015-01-23 15:12 ` [PATCH 6/8] usb: dwc3: add ULPI interface support Heikki Krogerus
2015-01-23 16:24 ` Felipe Balbi
2015-01-26 11:46 ` Heikki Krogerus
2015-01-26 19:35 ` Felipe Balbi
2015-01-27 11:09 ` Heikki Krogerus
2015-01-27 15:24 ` Felipe Balbi
2015-02-11 19:34 ` David Cohen
2015-02-12 12:12 ` Heikki Krogerus
2015-02-13 1:41 ` David Cohen
2015-02-13 1:54 ` David Cohen
2015-02-13 13:16 ` Heikki Krogerus
2015-02-13 22:03 ` David Cohen
2015-02-13 22:04 ` Felipe Balbi
2015-01-23 15:12 ` [PATCH 7/8] phy: helpers for USB ULPI PHY registering Heikki Krogerus
2015-01-29 5:03 ` Felipe Balbi
2015-01-29 14:34 ` Heikki Krogerus
2015-01-29 16:11 ` Felipe Balbi
2015-01-30 10:33 ` Heikki Krogerus
2015-01-30 16:03 ` Felipe Balbi
2015-01-23 15:12 ` [PATCH 8/8] phy: add driver for TI TUSB1210 ULPI PHY Heikki Krogerus
2015-01-24 23:58 ` David Cohen
2015-01-26 12:55 ` Heikki Krogerus
2015-01-26 19:23 ` David Cohen
2015-01-27 9:28 ` Heikki Krogerus
2015-01-27 12:57 ` Heikki Krogerus
2015-01-27 17:38 ` David Cohen
2015-01-28 14:20 ` Heikki Krogerus
2015-01-28 18:02 ` David Cohen
2015-01-29 14:14 ` Heikki Krogerus
2015-01-29 16:20 ` Felipe Balbi
2015-01-29 18:02 ` David Cohen
2015-01-30 12:18 ` Heikki Krogerus
2015-01-30 16:09 ` David Cohen
2015-02-02 12:50 ` Heikki Krogerus [this message]
2015-01-30 9:29 ` Heikki Krogerus
2015-01-30 16:14 ` Felipe Balbi
2015-01-30 16:25 ` David Cohen
2015-01-30 16:30 ` Felipe Balbi
2015-01-30 16:20 ` David Cohen
2015-01-30 16:33 ` Felipe Balbi
2015-02-02 12:59 ` Heikki Krogerus
2015-02-03 11:37 ` Heikki Krogerus
2015-02-10 18:33 ` David Cohen
2015-02-10 19:05 ` David Cohen
2015-02-10 19:23 ` David Cohen
2015-02-11 13:12 ` Heikki Krogerus
2015-02-11 19:36 ` David Cohen
2015-02-13 22:02 ` David Cohen
2015-02-13 22:03 ` Felipe Balbi
2015-02-13 22:13 ` David Cohen
2015-01-29 5:09 ` Felipe Balbi
2015-01-29 14:30 ` Heikki Krogerus
2015-01-29 16:20 ` Felipe Balbi
2015-01-29 18:04 ` David Cohen
2015-01-29 18:25 ` David Cohen
2015-01-29 18:47 ` David Cohen
2015-01-30 10:30 ` Heikki Krogerus
2015-02-13 1:52 ` David Cohen
2015-02-13 12:35 ` Heikki Krogerus
2015-02-13 16:01 ` 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=20150202125030.GA30962@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=balbi@ti.com \
--cc=baolu.lu@linux.intel.com \
--cc=david.a.cohen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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