From: Thierry Reding <thierry.reding@gmail.com>
To: JC Kuo <jckuo@nvidia.com>, Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jon Hunter <jonathanh@nvidia.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
linux-tegra@vger.kernel.org,
Linux USB List <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
devicetree@vger.kernel.org,
Nagarjuna Kristam <nkristam@nvidia.com>
Subject: Re: [PATCH v4 3/5] dt-bindings: phy: tegra: Add Tegra194 support
Date: Thu, 17 Oct 2019 14:01:28 +0200 [thread overview]
Message-ID: <20191017120128.GE3122066@ulmo> (raw)
In-Reply-To: <57692050-8284-a31f-71fd-7441823f3f2b@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 3569 bytes --]
On Thu, Oct 17, 2019 at 03:48:52PM +0800, JC Kuo wrote:
> Hi Thierry, Hi Rob, Hi Kishon,
> Please let me know your thoughts of the below implementation.
>
> 1. Add a "bool disable_gen2" to "phy->attrs" structure.
> 2. In _of_phy_get() of phy-core.c to add the follow to parse a generic property.
>
> phy->attrs.disable_gen2 = of_property_read_bool(args.np,
> "usb-disable-gen2");
Regarding this, I'm not sure how Rob imagined the generic properties to
work. Perhaps he was thinking about something like the max-link-speed
property found in the PCI bindings.
We could have something like this:
- max-link-speed:
If present this property specifies the USB generation supported on
the PHY/port. Must be:
1: for USB 3.1 Gen 1 (a.k.a. USB 3.0)
2: for USB 3.1 Gen 2
I'm not sure if we need to consider anything prior to USB 3.0. I suppose
we could do a similar mapping to what I proposed for the PHY ->set_mode
callback:
- max-link-speed:
If present this property specifies the USB generation supported on
the PHY/port. Must be:
0x0100: for USB 1.0 (Low-Speed)
0x0101: for USB 1.1 (Full-Speed)
0x0200: for USB 2.0 (Hi-Speed)
0x0300: for USB 3.0 (SuperSpeed) (a.k.a. USB 3.1 Gen 1)
0x0301: for USB 3.1 (SuperSpeed 10 Gbit/s) (a.k.a. USB 3.1 Gen 2)
0x0302: for USB 3.2 (SuperSpeed 20 Gbit/s) (a.k.a. USB 3.2 Gen 2 x 2)
...
Or those could just be sequentially enumerated, like in the above
example.
Rob, any thoughts?
Thierry
> 3. In individual phy driver, to add SOC/PHY specific programming accordingly.
>
> Thanks,
> JC
>
> On 10/14/19 9:40 PM, Rob Herring wrote:
> > On Mon, Oct 14, 2019 at 8:17 AM Thierry Reding <thierry.reding@gmail.com> wrote:
> >>
> >> On Wed, Oct 09, 2019 at 06:39:00PM -0500, Rob Herring wrote:
> >>> On Wed, Oct 09, 2019 at 10:43:41AM +0800, JC Kuo wrote:
> >>>> Extend the bindings to cover the set of features found in Tegra194.
> >>>> Note that, technically, there are four more supplies connected to the
> >>>> XUSB pad controller (DVDD_PEX, DVDD_PEX_PLL, HVDD_PEX and HVDD_PEX_PLL)
> >>>> , but the power sequencing requirements of Tegra194 require these to be
> >>>> under the control of the PMIC.
> >>>>
> >>>> Tegra194 XUSB PADCTL supports up to USB 3.1 Gen 2 speed, however, it is
> >>>> possible for some platforms have long signal trace that could not
> >>>> provide sufficient electrical environment for Gen 2 speed. To deal with
> >>>> this, a new device node property "nvidia,disable-gen2" was added to
> >>>> Tegra194 that be used to specifically disable Gen 2 speed for a
> >>>> particular USB 3.0 port so that the port can be limited to Gen 1 speed
> >>>> and avoid the instability.
> >>>
> >>> I suspect this may be a common issue and we should have a common
> >>> property. Typically, this kind of property is in the controller though
> >>> and supports multiple speed limits. See PCI bindings for inspiration.
> >>
> >> Given that support for gen 2 speeds is dependent on signal trace length,
> >> it doesn't really make sense to restrict the whole controller to a given
> >> speed if only the signal trace for a single port exceeds the limit for
> >> which gen 2 would work.
> >>
> >> Also, the USB PHYs are in a different hardware block than the USB
> >> controller, so this really is a property of the PHY block, not the USB
> >> controller.
> >
> > Okay, but still should be common for USB PHYs IMO.
> >
> > Rob
> >
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-10-17 12:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 2:43 [PATCH v4 0/5] add Tegra194 XUSB host and pad controller support JC Kuo
2019-10-09 2:43 ` [PATCH v4 1/5] phy: tegra: xusb: Protect Tegra186 soc with config JC Kuo
2019-10-14 13:11 ` Thierry Reding
2019-10-09 2:43 ` [PATCH v4 2/5] phy: tegra: xusb: Add Tegra194 support JC Kuo
2019-10-14 13:12 ` Thierry Reding
2019-10-09 2:43 ` [PATCH v4 3/5] dt-bindings: phy: tegra: " JC Kuo
2019-10-09 23:39 ` Rob Herring
2019-10-14 13:17 ` Thierry Reding
2019-10-14 13:40 ` Rob Herring
2019-10-17 7:48 ` JC Kuo
2019-10-17 11:44 ` Thierry Reding
2019-10-17 12:01 ` Thierry Reding [this message]
2019-11-26 4:21 ` Nagarjuna Kristam
2019-10-09 2:43 ` [PATCH v4 4/5] arm64: tegra: Add XUSB and pad controller on Tegra194 JC Kuo
2019-10-09 2:43 ` [PATCH v4 5/5] arm64: tegra: Enable XUSB host in P2972-0000 board JC Kuo
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=20191017120128.GE3122066@ulmo \
--to=thierry.reding@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jckuo@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nkristam@nvidia.com \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).