summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/connector
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2020-05-29 20:06:31 +0200
committerRob Herring <robh@kernel.org>2020-05-29 16:21:51 -0600
commit8f8986e932c5f81e51aacc1e675393300a0a5b87 (patch)
tree9dd38f77c208754cd6b2758331bcfb99d37e8904 /Documentation/devicetree/bindings/connector
parent41a053886b059d60945d3575e2328ff661599a04 (diff)
dt-bindings: Merge gpio-usb-b-connector with usb-connector
The binding for usb-connector is a superset of gpio-usb-b-connector. One major difference is that gpio-usb-b-connector requires at least one of the vbus-gpios and id-gpios properties to be specified. Merge the two bindings by adding the compatible string combination for the GPIO USB-B variant and an extra conditional for the required properties list to the usb-connector.yaml file. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/connector')
-rw-r--r--Documentation/devicetree/bindings/connector/usb-connector.yaml39
1 files changed, 35 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml
index 03b92b6f35fa..9bd52e63c935 100644
--- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
+++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
@@ -15,10 +15,15 @@ description:
properties:
compatible:
- enum:
- - usb-a-connector
- - usb-b-connector
- - usb-c-connector
+ oneOf:
+ - enum:
+ - usb-a-connector
+ - usb-b-connector
+ - usb-c-connector
+
+ - items:
+ - const: gpio-usb-b-connector
+ - const: usb-b-connector
label:
description: Symbolic name for the connector.
@@ -140,6 +145,19 @@ properties:
required:
- compatible
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: gpio-usb-b-connector
+ then:
+ anyOf:
+ - required:
+ - vbus-gpios
+ - required:
+ - id-gpios
+
examples:
# Micro-USB connector with HS lines routed via controller (MUIC).
- |
@@ -202,3 +220,16 @@ examples:
op-sink-microwatt = <10000000>;
};
};
+
+ # USB connector with GPIO control lines
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ usb {
+ connector {
+ compatible = "gpio-usb-b-connector", "usb-b-connector";
+ type = "micro";
+ id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>;
+ vbus-supply = <&usb_p0_vbus>;
+ };
+ };