mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
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>
This commit is contained in:
parent
41a053886b
commit
8f8986e932
@ -15,10 +15,15 @@ description:
|
|||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
enum:
|
oneOf:
|
||||||
- usb-a-connector
|
- enum:
|
||||||
- usb-b-connector
|
- usb-a-connector
|
||||||
- usb-c-connector
|
- usb-b-connector
|
||||||
|
- usb-c-connector
|
||||||
|
|
||||||
|
- items:
|
||||||
|
- const: gpio-usb-b-connector
|
||||||
|
- const: usb-b-connector
|
||||||
|
|
||||||
label:
|
label:
|
||||||
description: Symbolic name for the connector.
|
description: Symbolic name for the connector.
|
||||||
@ -140,6 +145,19 @@ properties:
|
|||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- if:
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
contains:
|
||||||
|
const: gpio-usb-b-connector
|
||||||
|
then:
|
||||||
|
anyOf:
|
||||||
|
- required:
|
||||||
|
- vbus-gpios
|
||||||
|
- required:
|
||||||
|
- id-gpios
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
# Micro-USB connector with HS lines routed via controller (MUIC).
|
# Micro-USB connector with HS lines routed via controller (MUIC).
|
||||||
- |
|
- |
|
||||||
@ -202,3 +220,16 @@ examples:
|
|||||||
op-sink-microwatt = <10000000>;
|
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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
USB GPIO Based Connection Detection
|
|
||||||
|
|
||||||
This is typically used to switch dual role mode from the USB ID pin connected
|
|
||||||
to an input GPIO, and also used to enable/disable device mode from the USB
|
|
||||||
Vbus pin connected to an input GPIO.
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
- compatible : should include "gpio-usb-b-connector" and "usb-b-connector".
|
|
||||||
- id-gpios, vbus-gpios : input gpios, either one of them must be present,
|
|
||||||
and both can be present as well.
|
|
||||||
see connector/usb-connector.yaml
|
|
||||||
|
|
||||||
Optional properties:
|
|
||||||
- vbus-supply : can be present if needed when supports dual role mode.
|
|
||||||
see connector/usb-connector.yaml
|
|
||||||
|
|
||||||
- Sub-nodes:
|
|
||||||
- port : can be present.
|
|
||||||
see graph.txt
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
&mtu3 {
|
|
||||||
connector {
|
|
||||||
compatible = "gpio-usb-b-connector", "usb-b-connector";
|
|
||||||
type = "micro";
|
|
||||||
id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>;
|
|
||||||
vbus-supply = <&usb_p0_vbus>;
|
|
||||||
};
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user