Re: [PATCH v3 1/3] dt-bindings: usb: dwc3: Add support for multiport related properties

From: Rob Herring
Date: Thu Jun 09 2022 - 11:38:38 EST


On Wed, Jun 08, 2022 at 11:06:25PM +0530, Harsh Agarwal wrote:
> Added support for multiport, mport, num_usb2_phy and num_usb3_phy
> properties. These properties are used to support devices having
> a multiport controller.
>
> Signed-off-by: Harsh Agarwal <quic_harshq@xxxxxxxxxxx>
> ---
> .../devicetree/bindings/usb/snps,dwc3.yaml | 53 ++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> index d41265b..9332fa2 100644
> --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> @@ -343,6 +343,32 @@ properties:
> This port is used with the 'usb-role-switch' property to connect the
> dwc3 to type C connector.
>
> + multiport:

Again, I don't think this is going to play well if you need to describe
USB devices in your DT. For example, a USB hub with additional DT
properties.

> + description:
> + If a single USB controller supports multiple ports, then it's referred to as
> + a multiport controller. Each port of the multiport controller can support
> + either High Speed or Super Speed or both and have their own PHY phandles. Each
> + port is represented by "mport" node and all the "mport" nodes are grouped
> + together inside the "multiport" node where individual "mport" node defines the
> + PHYs supported by that port.
> +
> + num_usb2_phy:
> + description: Total number of HS-PHYs defined by the multiport controller.
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + num_usb3_phy:
> + description: Total number of SS-PHYs defined by the multiport controller.
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + mport:
> + description: Each mport node represents one port of the multiport controller.
> + oneOf:
> + - required:
> + - usb-phy

This is deprecated. Why are you adding it?

> + - required:
> + - phys
> + - phy-names

Other multi port USB hosts just have a list of phys. Why can't you just
use phy-names to identify each phy:

phy-names = "port0-hs", "port0-ss", "port1-hs", "port1-ss", "port2-hs",
"port3-hs";

Rob