From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Andrew Bresticker
<abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Subject: Re: [PATCH v10 1/9] dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding
Date: Wed, 16 Mar 2016 11:39:28 -0600 [thread overview]
Message-ID: <56E99A50.4010002@wwwdotorg.org> (raw)
In-Reply-To: <1457108379-20794-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 03/04/2016 09:19 AM, Thierry Reding wrote:
> From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> The NVIDIA Tegra XUSB pad controller provides a set of pads, each with a
> set of lanes that are used for PCIe, SATA and USB.
> .../bindings/phy/nvidia,tegra124-xusb-padctl.txt | 376 +++++++++++++++++++++
> .../pinctrl/nvidia,tegra124-xusb-padctl.txt | 5 +
It seems odd to add part of the deprecation notice in this patch and one
more line in the second/next patch. Did an update get squashed into the
wrong commit? I'd suggest moving the edit to existing file
nvidia,tegra124-xusb-padctl.txt entirely into patch 2. Perhaps this
could happen while/when the patch is applied to avoid having to post
another version.
> diff --git a/Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt b/Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt
...
> +Pads will be represented as children of the top-level XUSB pad controller
> +device tree node.
Nit: grand-children, since they're house inside pads{} first. I might
suggest:
A "pads" node exists to represent all pads contained within the XUSB
controller. Each pad is represented as a subnode of the pads node.
> Each lane exposed by the pad will be represented by its
> +own subnode and can be referenced by users of the lane using the standard
> +PHY bindings, as described by the phy-bindings.txt file in this directory.
"Each lane exposed by the pad will be represented as a subnode of the
pad node ..."?
I'd suggest adding a similar paragraph describing the ports node, and
that ports are child nodes of that. Otherwise, since the documentation
of the nodes isn't nested in any way, it's not clear from the text
exactly what nodes are children of what other nodes.
> +The Tegra hardware documentation refers to the connection between the XUSB
> +pad controller and the XUSB controller as "ports".
I think, being pedantic, that "port" in the TRM refers to the set of
signals at the edge/interface-to the IO controller, not the connection
between the IO controller and the XUSB controller. Still, the existing
wording in this patch is fine; no need to change it.
Still, the examples do clear this up, so perhaps it's not worth another
version of the series to fix this. Or if you do think it's worth fixing,
I'd be perfectly happy to see that done in follow-on patches. If you
want I can write that follow-on patch once this series is applied.
...
> +PHY nodes:
> +==========
> +
> +Each pad node has one or more children, each representing one of the lanes
> +controlled by the pad.
> +
> +Required properties:
> +--------------------
> +- status: Defines the operation status of the PHY. Valid values are:
> + - "disabled": the PHY is disabled
> + - "okay": the PHY is enabled
Presumably the standard semantics of a missing status property
implicitly meaning "okay" are also intended? A similar comment applies
to other places where status is documented. "status" is typically not a
required property.
> +Port nodes:
> +===========
> +USB2 ports:
> +-----------
Should that say "UTMI ports"? ULPI and HSIC below are (or can be) USB2
ports too.
> +Required properties:
> +- status: Defines the operation status of the port. Valid values are:
> + - "disabled": the port is disabled
> + - "okay": the port is enabled
> +- mode: A string that determines the mode in which to run the port. Valid
> + values are:
> + - "host": for USB host mode
> + - "device": for USB device mode
> + - "otg": for USB OTG mode
How do these properties tie the DT-based port definition to a particular
PHY/lane/... in HW? I don't see a property that contains any kind of HW
ID here.
...
> +Optional properties:
> +- nvidia,internal: A boolean property whose presence determines that a port
> + is internal. In the absence of this property the port is considered to be
> + external.
It's not clear what "internal" and "external" mean. Presumably it's
on-PCB vs. physical-connector-exposed-to-the-user. It may be worth
explicitly mentioning that.
Is there no vbus-supply for USB2/UTMI ports? I'm also not sure why
vbus-supply is optional for ULPI and HSIC. Even if there is no SW
/control/ over VBUS, there still must be some source of power; IIRC Mark
Brown typically desires that to be explicitly modelled with an always-on
regulator if there's no SW control.
> +Super-speed USB ports:
> +----------------------
> +
> +Required properties:
> +- status: Defines the operation status of the port. Valid values are:
> + - "disabled": the port is disabled
> + - "okay": the port is enabled
> +- nvidia,usb2-companion: A single cell that specifies the physical port number
> + to map this super-speed USB port to. The range of valid port numbers varies
> + with the SoC generation:
> + - 0-2: for Tegra124 and Tegra132
How can this be used to look up the corresponding USB2 node in DT? I
would have expected a phandle here, with the physical (HW) port ID being
represented in the referenced node. Otherwise, I don't see how to tie
together the USB2 and USB3 DT nodes.
> +For Tegra124 and Tegra132, the XUSB pad controller exposes the following
> +ports:
> +- 3x USB2: usb2-0, usb2-1, usb2-2
> +- 1x ULPI: ulpi-0
> +- 2x HSIC: hsic-0, hsic-1
> +- 2x super-speed USB: usb3-0, usb3-1
Oh, is the physical port ID implicit in the DT node name? It may be
worth mentioning that when describing the properties for each type of node.
I'll assume that's how the USB2<->USB3 mapping works. All of my comments
are mainly re: the description/documentation of the binding itself. That
can all be enhanced later. The underlying binding itself, and the
example, look reasonable. As such, this patch,
Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
Andrew Bresticker <abrestic@chromium.org>,
linux-tegra@vger.kernel.org, devicetree@vger.kernel.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH v10 1/9] dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding
Date: Wed, 16 Mar 2016 11:39:28 -0600 [thread overview]
Message-ID: <56E99A50.4010002@wwwdotorg.org> (raw)
In-Reply-To: <1457108379-20794-1-git-send-email-thierry.reding@gmail.com>
On 03/04/2016 09:19 AM, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> The NVIDIA Tegra XUSB pad controller provides a set of pads, each with a
> set of lanes that are used for PCIe, SATA and USB.
> .../bindings/phy/nvidia,tegra124-xusb-padctl.txt | 376 +++++++++++++++++++++
> .../pinctrl/nvidia,tegra124-xusb-padctl.txt | 5 +
It seems odd to add part of the deprecation notice in this patch and one
more line in the second/next patch. Did an update get squashed into the
wrong commit? I'd suggest moving the edit to existing file
nvidia,tegra124-xusb-padctl.txt entirely into patch 2. Perhaps this
could happen while/when the patch is applied to avoid having to post
another version.
> diff --git a/Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt b/Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt
...
> +Pads will be represented as children of the top-level XUSB pad controller
> +device tree node.
Nit: grand-children, since they're house inside pads{} first. I might
suggest:
A "pads" node exists to represent all pads contained within the XUSB
controller. Each pad is represented as a subnode of the pads node.
> Each lane exposed by the pad will be represented by its
> +own subnode and can be referenced by users of the lane using the standard
> +PHY bindings, as described by the phy-bindings.txt file in this directory.
"Each lane exposed by the pad will be represented as a subnode of the
pad node ..."?
I'd suggest adding a similar paragraph describing the ports node, and
that ports are child nodes of that. Otherwise, since the documentation
of the nodes isn't nested in any way, it's not clear from the text
exactly what nodes are children of what other nodes.
> +The Tegra hardware documentation refers to the connection between the XUSB
> +pad controller and the XUSB controller as "ports".
I think, being pedantic, that "port" in the TRM refers to the set of
signals at the edge/interface-to the IO controller, not the connection
between the IO controller and the XUSB controller. Still, the existing
wording in this patch is fine; no need to change it.
Still, the examples do clear this up, so perhaps it's not worth another
version of the series to fix this. Or if you do think it's worth fixing,
I'd be perfectly happy to see that done in follow-on patches. If you
want I can write that follow-on patch once this series is applied.
...
> +PHY nodes:
> +==========
> +
> +Each pad node has one or more children, each representing one of the lanes
> +controlled by the pad.
> +
> +Required properties:
> +--------------------
> +- status: Defines the operation status of the PHY. Valid values are:
> + - "disabled": the PHY is disabled
> + - "okay": the PHY is enabled
Presumably the standard semantics of a missing status property
implicitly meaning "okay" are also intended? A similar comment applies
to other places where status is documented. "status" is typically not a
required property.
> +Port nodes:
> +===========
> +USB2 ports:
> +-----------
Should that say "UTMI ports"? ULPI and HSIC below are (or can be) USB2
ports too.
> +Required properties:
> +- status: Defines the operation status of the port. Valid values are:
> + - "disabled": the port is disabled
> + - "okay": the port is enabled
> +- mode: A string that determines the mode in which to run the port. Valid
> + values are:
> + - "host": for USB host mode
> + - "device": for USB device mode
> + - "otg": for USB OTG mode
How do these properties tie the DT-based port definition to a particular
PHY/lane/... in HW? I don't see a property that contains any kind of HW
ID here.
...
> +Optional properties:
> +- nvidia,internal: A boolean property whose presence determines that a port
> + is internal. In the absence of this property the port is considered to be
> + external.
It's not clear what "internal" and "external" mean. Presumably it's
on-PCB vs. physical-connector-exposed-to-the-user. It may be worth
explicitly mentioning that.
Is there no vbus-supply for USB2/UTMI ports? I'm also not sure why
vbus-supply is optional for ULPI and HSIC. Even if there is no SW
/control/ over VBUS, there still must be some source of power; IIRC Mark
Brown typically desires that to be explicitly modelled with an always-on
regulator if there's no SW control.
> +Super-speed USB ports:
> +----------------------
> +
> +Required properties:
> +- status: Defines the operation status of the port. Valid values are:
> + - "disabled": the port is disabled
> + - "okay": the port is enabled
> +- nvidia,usb2-companion: A single cell that specifies the physical port number
> + to map this super-speed USB port to. The range of valid port numbers varies
> + with the SoC generation:
> + - 0-2: for Tegra124 and Tegra132
How can this be used to look up the corresponding USB2 node in DT? I
would have expected a phandle here, with the physical (HW) port ID being
represented in the referenced node. Otherwise, I don't see how to tie
together the USB2 and USB3 DT nodes.
> +For Tegra124 and Tegra132, the XUSB pad controller exposes the following
> +ports:
> +- 3x USB2: usb2-0, usb2-1, usb2-2
> +- 1x ULPI: ulpi-0
> +- 2x HSIC: hsic-0, hsic-1
> +- 2x super-speed USB: usb3-0, usb3-1
Oh, is the physical port ID implicit in the DT node name? It may be
worth mentioning that when describing the properties for each type of node.
I'll assume that's how the USB2<->USB3 mapping works. All of my comments
are mainly re: the description/documentation of the binding itself. That
can all be enhanced later. The underlying binding itself, and the
example, look reasonable. As such, this patch,
Acked-by: Stephen Warren <swarren@nvidia.com>
next prev parent reply other threads:[~2016-03-16 17:39 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 16:19 [PATCH v10 1/9] dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding Thierry Reding
2016-03-04 16:19 ` Thierry Reding
2016-03-04 16:19 ` [PATCH v10 2/9] dt-bindings: pinctrl: Deprecate " Thierry Reding
2016-03-05 4:32 ` Rob Herring
2016-03-15 9:01 ` Linus Walleij
[not found] ` <CACRpkda_YvQQesSUiZB0cpotZWyyd+5nUqzz3HjnY9fCanWJwQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-18 11:12 ` Thierry Reding
2016-04-18 11:12 ` Thierry Reding
[not found] ` <20160418111200.GA17716-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-18 11:26 ` Linus Walleij
2016-04-18 11:26 ` Linus Walleij
2016-04-18 11:36 ` Thierry Reding
2016-04-18 11:36 ` Thierry Reding
[not found] ` <1457108379-20794-2-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-16 17:40 ` Stephen Warren
2016-03-16 17:40 ` Stephen Warren
2016-03-04 16:19 ` [PATCH v10 3/9] dt-bindings: phy: tegra-xusb-padctl: Add Tegra210 support Thierry Reding
[not found] ` <1457108379-20794-3-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-04 21:41 ` Andrew Bresticker
2016-03-04 21:41 ` Andrew Bresticker
2016-03-05 4:32 ` Rob Herring
2016-03-05 4:32 ` Rob Herring
2016-03-15 9:03 ` Linus Walleij
2016-03-15 9:03 ` Linus Walleij
2016-03-16 17:59 ` Stephen Warren
2016-03-16 17:59 ` Stephen Warren
[not found] ` <56E99F10.1060508-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-04-05 14:44 ` Thierry Reding
2016-04-05 14:44 ` Thierry Reding
[not found] ` <20160405144416.GA10809-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-05 21:10 ` Stephen Warren
2016-04-05 21:10 ` Stephen Warren
[not found] ` <570429B8.3060002-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-04-06 17:08 ` Thierry Reding
2016-04-06 17:08 ` Thierry Reding
[not found] ` <20160406170824.GA28843-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-07 20:42 ` Stephen Warren
2016-04-07 20:42 ` Stephen Warren
2016-04-18 11:50 ` Thierry Reding
2016-04-18 11:50 ` Thierry Reding
[not found] ` <20160418115035.GD17716-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-25 13:48 ` Kishon Vijay Abraham I
2016-04-25 13:48 ` Kishon Vijay Abraham I
2016-03-04 16:19 ` [PATCH v10 7/9] dt-bindings: usb: xhci-tegra: Add Tegra210 XUSB controller support Thierry Reding
[not found] ` <1457108379-20794-7-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-16 6:42 ` Rob Herring
2016-03-16 6:42 ` Rob Herring
2016-03-16 18:08 ` Stephen Warren
2016-03-16 18:08 ` Stephen Warren
2016-03-04 21:36 ` [PATCH v10 1/9] dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding Andrew Bresticker
2016-03-05 4:31 ` Rob Herring
2016-03-07 11:24 ` Thierry Reding
2016-03-07 11:24 ` Thierry Reding
2016-03-16 6:42 ` Rob Herring
[not found] ` <1457108379-20794-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-04 16:19 ` [PATCH v10 4/9] phy: Add Tegra XUSB pad controller support Thierry Reding
2016-03-04 16:19 ` Thierry Reding
[not found] ` <1457108379-20794-4-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-05 13:16 ` Thierry Reding
2016-04-05 13:16 ` Thierry Reding
2016-04-06 12:43 ` Kishon Vijay Abraham I
2016-04-06 12:43 ` Kishon Vijay Abraham I
2016-04-06 17:26 ` Thierry Reding
[not found] ` <20160406172616.GB28843-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-07 9:32 ` Kishon Vijay Abraham I
2016-04-07 9:32 ` Kishon Vijay Abraham I
2016-04-18 11:43 ` Thierry Reding
2016-04-18 11:43 ` Thierry Reding
2016-04-26 13:44 ` Linus Walleij
2016-03-04 16:19 ` [PATCH v10 5/9] phy: tegra: Add Tegra210 support Thierry Reding
2016-03-04 16:19 ` Thierry Reding
2016-03-04 16:19 ` [PATCH v10 6/9] dt-bindings: usb: Add NVIDIA Tegra XUSB controller binding Thierry Reding
2016-03-04 16:19 ` Thierry Reding
[not found] ` <1457108379-20794-6-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-16 18:08 ` Stephen Warren
2016-03-16 18:08 ` Stephen Warren
2016-03-04 16:19 ` [PATCH v10 8/9] usb: xhci: Add NVIDIA Tegra XUSB controller driver Thierry Reding
2016-03-04 16:19 ` Thierry Reding
[not found] ` <1457108379-20794-8-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-05 13:17 ` Thierry Reding
2016-04-05 13:17 ` Thierry Reding
[not found] ` <20160405131751.GB24972-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-05 13:35 ` Greg Kroah-Hartman
2016-04-05 13:35 ` Greg Kroah-Hartman
[not found] ` <20160405133552.GB28802-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2016-04-05 16:18 ` Mathias Nyman
2016-04-05 16:18 ` Mathias Nyman
2016-04-07 11:03 ` Mathias Nyman
2016-04-07 11:03 ` Mathias Nyman
[not found] ` <57063E91.1070202-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-07 11:05 ` Thierry Reding
2016-04-07 11:05 ` Thierry Reding
2016-04-07 11:50 ` Mathias Nyman
2016-03-04 16:19 ` [PATCH v10 9/9] usb: xhci: tegra: Add Tegra210 support Thierry Reding
2016-03-04 16:19 ` Thierry Reding
2016-03-04 21:47 ` [PATCH v10 1/9] dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding Andrew Bresticker
2016-03-04 21:47 ` Andrew Bresticker
2016-03-16 17:39 ` Stephen Warren [this message]
2016-03-16 17:39 ` Stephen Warren
2016-03-22 11:01 ` Linus Walleij
2016-03-22 11:01 ` Linus Walleij
2016-03-29 15:24 ` Marcel Ziswiler
[not found] ` <1459265099.5073.29.camel-mitwqZ+T+m9Wk0Htik3J/w@public.gmane.org>
2016-03-29 17:08 ` Thierry Reding
[not found] ` <20160329170844.GA26314-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2016-03-30 10:44 ` Marcel Ziswiler
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=56E99A50.4010002@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=kishon-l0cyMroinI0@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.