linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: usb: Add binding for onboard USB hubs
@ 2020-09-14 18:27 Matthias Kaehlcke
  2020-09-14 18:27 ` [PATCH 2/2] USB: misc: Add onboard_usb_hub driver Matthias Kaehlcke
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Matthias Kaehlcke @ 2020-09-14 18:27 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Frank Rowand
  Cc: Alan Stern, Krzysztof Kozlowski, Bastien Nocera,
	Ravi Chandra Sadineni, linux-usb, Stephen Boyd, devicetree,
	Douglas Anderson, Peter Chen, linux-kernel, Matthias Kaehlcke

Onboard USB hubs need to be powered and may require initiaization of
other resources (like GPIOs or clocks) to work properly. This adds
a device tree binding for these hubs.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---

 .../bindings/usb/onboard_usb_hub.yaml         | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/onboard_usb_hub.yaml

diff --git a/Documentation/devicetree/bindings/usb/onboard_usb_hub.yaml b/Documentation/devicetree/bindings/usb/onboard_usb_hub.yaml
new file mode 100644
index 000000000000..f82d8f459eed
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/onboard_usb_hub.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/onboard_usb_hub.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binding for onboard USB hubs
+
+maintainers:
+  - Matthias Kaehlcke <mka@chromium.org>
+
+allOf:
+  - $ref: /schemas/usb/onboard_usb_hub.yaml#
+
+properties:
+  compatible:
+    enum:
+      - onboard-usb-hub
+      - realtek,rts5411
+
+  power-off-in-suspend:
+    description:
+      The hub should be powered off during system suspend. When the
+      "wakeup-source" property is also provided the hub is only powered
+      off during suspend when no wakeup capable descendants are connected.
+    type: boolean
+
+  vdd-supply:
+    description:
+      phandle to the regulator that provides power to the hub.
+
+  wakeup-source:
+    description:
+      Wakeup capable USB devices connected to this hub can be used as
+      wakeup source.
+    type: boolean
+
+required:
+  - compatible
+  - vdd-supply
+
+examples:
+  - |
+    usb_hub: usb-hub {
+        compatible = "realtek,rts5411", "onboard-usb-hub";
+        vdd-supply = <&pp3300_hub>;
+        power-off-in-suspend;
+        wakeup-source;
+    };
+
+    &usb_1_dwc3 {
+	dr_mode = "host";
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	/* 2.0 hub on port 1 */
+	hub@1 {
+		compatible = "usbbda,5411";
+		reg = <1>;
+		hub = <&usb_hub>;
+	};
+
+	/* 3.0 hub on port 2 */
+	hub@2 {
+		compatible = "usbbda,411";
+		reg = <2>;
+		hub = <&usb_hub>;
+	};
+
+...
-- 
2.28.0.618.gf4bc123cb7-goog


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-09-22 23:39 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14 18:27 [PATCH 1/2] dt-bindings: usb: Add binding for onboard USB hubs Matthias Kaehlcke
2020-09-14 18:27 ` [PATCH 2/2] USB: misc: Add onboard_usb_hub driver Matthias Kaehlcke
2020-09-14 19:52   ` Matthias Kaehlcke
2020-09-14 20:14   ` Alan Stern
2020-09-14 21:14     ` Matthias Kaehlcke
2020-09-15  2:55   ` Peter Chen
2020-09-15  5:02     ` Matthias Kaehlcke
2020-09-15  7:05       ` Peter Chen
2020-09-15 23:03         ` Matthias Kaehlcke
2020-09-16  2:14           ` Alan Stern
2020-09-16 19:27             ` Matthias Kaehlcke
2020-09-16  8:19           ` Peter Chen
2020-09-16 19:16             ` Matthias Kaehlcke
2020-09-17  0:27               ` Peter Chen
2020-09-17  0:47                 ` Matthias Kaehlcke
2020-09-17  1:24                   ` Peter Chen
2020-09-17 15:54                     ` Matthias Kaehlcke
2020-09-15 14:21 ` [PATCH 1/2] dt-bindings: usb: Add binding for onboard USB hubs Rob Herring
2020-09-16  0:00   ` Matthias Kaehlcke
2020-09-18 16:05     ` Rob Herring
2020-09-22 23:39       ` Matthias Kaehlcke
2020-09-15 14:21 ` Rob Herring

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).