From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org"
<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Pawel Moll <Pawel.Moll-5wv7dgnIgG8@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Ian Campbell
<ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] usb: dwc3: core: clarify usb-phy array binding
Date: Wed, 18 Sep 2013 09:21:18 -0500 [thread overview]
Message-ID: <20130918142118.GJ21559@radagast> (raw)
In-Reply-To: <20130828160151.GA17229-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2909 bytes --]
Hi,
On Wed, Aug 28, 2013 at 05:01:51PM +0100, Mark Rutland wrote:
> > > So it's not physically possible for someone to just wire up a single phy
> > > to the device, either USB2-only or USB3?
> >
> > of course it is :-) In fact, TI has done it. But it causes a whole bunch
> > of other problems to support that sort of model. For one, in some
> > systems, a clock generated by the USB3 PHY is backfed into the IP and if
> > USB3 PHY isn't running, the dwc3 IP won't start.
>
> That sounds like a mess. But unless I've misunderstood, that doesn't
well, it is :-)
> sound like a general problem with having one phy, but rather an
> integration issue on a specific system? Presumably in that case as long
> as the phy was brought up before poking the rest of the IP, the unit
> would function correctly.
right, but what 'brings up' the PHY is usb_phy_init(). If we don't add
usb3phy to DTS or skip usb3phy in case maximum-speed < superspeed, then
we're screwed :-)
> > I even wrote a patch making USB3 PHY optional, but didn't push it
> > exactly because it broke some other systems and I can't guarantee users
> > won't mess up their DTS/pdata.
>
> Does that mean that their dts or pdata are wrong at the moment, but
> they're spared because the driver bails out due to a missing phy? If
> their pdata's wrong, that should be fixable relatively easily, but if
> the dt is wrong then I'm not sure how we can support those systems
> sensibly. That sounds like an ideal candidate for a dt quirks
> mechanism...
hmm, the idea of the patch was:
switch (maximum-speed) {
case SUPER:
grab_and_initialize_usb3_phy();
grab_and_initialize_usb2_phy();
break;
case HIGH:
case FULL:
case LOW:
grab_and_initialize_usb2_phy();
break;
}
now, imagine someone wants to run his dwc3 in highspeed mode, we
wouldn't initialize USB3 PHY which could cause the whole IP to break.
I tried poking around on device's registers to see if there was any way
to detect that the IP needs somethin back from USB3 PHY, but couldn't
find anything.
Since we can't know how the IP was integrated, it's best to leave it
alone and require NOP xceiv to be used.
> > > You can describe the USB2-only case in the dt by only listing the first
> > > phy (though the driver won't support it as it expects both to be
> > > present), but it's impossible to describe that you've wired up a single
> > > phy that's USB3 capable.
> >
> > you might be right there...
>
> Would it be possible to have something like (an optional) usb-phy-names?
> If not present, we assume the current situation, if present then we use
> it to figure out which phys are present. Maybe I'm missing something
> that makes that impossible?
you're missing the point regarding the IP possibly needing something
back from the PHY (e.g. a clock which PHY generates).
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-09-18 14:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 15:40 [PATCH] usb: dwc3: core: clarify usb-phy array binding Kumar Gala
2013-08-09 16:28 ` Mark Rutland
2013-08-09 18:42 ` Kumar Gala
2013-08-12 18:05 ` Felipe Balbi
2013-08-13 13:34 ` Mark Rutland
2013-08-27 18:53 ` Felipe Balbi
2013-08-28 16:01 ` Mark Rutland
[not found] ` <20130828160151.GA17229-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-09-18 14:21 ` Felipe Balbi [this message]
2013-09-18 16:46 ` Mark Rutland
[not found] ` <20130918164610.GC17453-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-09-18 16:56 ` 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=20130918142118.GJ21559@radagast \
--to=balbi-l0cymroini0@public.gmane.org \
--cc=Pawel.Moll-5wv7dgnIgG8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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).