Skip to content

usb: Set connect_type of hub ports based on DT

Stephen Boyd linux-devicetree linux-patches linux-usb lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 1 replyIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: usb: Add downstream facing ports to realtek bindingDocumentation/devicetree/bindings/usb/realtek,rts5411.yaml+55 -01 reply
2/2usb: core: Set connect_type of ports based on DT nodedrivers/usb/core/of.c drivers/usb/core/port.c include/linux/usb/of.h+80 -00 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchRob Herring
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] usb: Set connect_type of hub ports based on DT

This is split off of a larger series[1] that describes the USB and DP topology of ARM chromebooks such as Trogdor (sc7180-trogdor.dtsi). These patches can land at any time, so I'm sending them split out to hopefully focus review and land them earlier.

The first patch updates the realtek binding to describe the downstream facing ports (it has 4 ports). Child devices can also be hard-wired to the hub, in which case the binding allows those devices to only have reg properties with the valid port numbers (1 through 4).

The second patch sets the connect_type member of the usb port to reflect what the DT binding indicates. More details are in the patch, but the general goal is to set the connect_type based on DT so that it can be queried by userspace in sysfs. ChromeOS wants to know if a usb device is hard-wired or not so it can apply more or less security to the device.

Changes from v1 (https://lore.kernel.org/r/[email protected]):
* Moved the code to of.c to keep it tidy
* Updated the check for child nodes to only be for usb devices or graph binding in case of things like HSIC where a child node 'ulpi' could exist
* Fixed the binding to have #size-cells and #address-cells

Stephen Boyd (2):
dt-bindings: usb: Add downstream facing ports to realtek binding
usb: core: Set connect_type of ports based on DT node

 .../bindings/usb/realtek,rts5411.yaml         | 55 ++++++++++++++
 drivers/usb/core/of.c                         | 71 +++++++++++++++++++
 drivers/usb/core/port.c                       |  2 +
 include/linux/usb/of.h                        |  7 ++
 4 files changed, 135 insertions(+)
Cc Conor Dooley <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc maciek swiech <[email protected]>
Cc Matthias Kaehlcke <[email protected]>

[1] https://lore.kernel.org/r/[email protected]

base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d

Signature · 1 line
https://chromeos.dev