1USB Connector
2=============
3
4USB connector node represents physical USB connector. It should be
5a child of USB interface controller.
6
7Required properties:
8- compatible: describes type of the connector, must be one of:
9    "usb-a-connector",
10    "usb-b-connector",
11    "usb-c-connector".
12
13Optional properties:
14- label: symbolic name for the connector,
15- type: size of the connector, should be specified in case of USB-A, USB-B
16  non-fullsize connectors: "mini", "micro".
17- self-powered: Set this property if the usb device that has its own power
18  source.
19
20Optional properties for usb-b-connector:
21- id-gpios: an input gpio for USB ID pin.
22- vbus-gpios: an input gpio for USB VBUS pin, used to detect presence of
23  VBUS 5V.
24  see gpio/gpio.txt.
25- vbus-supply: a phandle to the regulator for USB VBUS if needed when host
26  mode or dual role mode is supported.
27  Particularly, if use an output GPIO to control a VBUS regulator, should
28  model it as a regulator.
29  see regulator/fixed-regulator.yaml
30- pinctrl-names : a pinctrl state named "default" is optional
31- pinctrl-0 : pin control group
32  see pinctrl/pinctrl-bindings.txt
33
34Optional properties for usb-c-connector:
35- power-role: should be one of "source", "sink" or "dual"(DRP) if typec
36  connector has power support.
37- try-power-role: preferred power role if "dual"(DRP) can support Try.SNK
38  or Try.SRC, should be "sink" for Try.SNK or "source" for Try.SRC.
39- data-role: should be one of "host", "device", "dual"(DRD) if typec
40  connector supports USB data.
41
42Required properties for usb-c-connector with power delivery support:
43- source-pdos: An array of u32 with each entry providing supported power
44  source data object(PDO), the detailed bit definitions of PDO can be found
45  in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.2
46  Source_Capabilities Message, the order of each entry(PDO) should follow
47  the PD spec chapter 6.4.1. Required for power source and power dual role.
48  User can specify the source PDO array via PDO_FIXED/BATT/VAR/PPS_APDO()
49  defined in dt-bindings/usb/pd.h.
50- sink-pdos: An array of u32 with each entry providing supported power
51  sink data object(PDO), the detailed bit definitions of PDO can be found
52  in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.3
53  Sink Capabilities Message, the order of each entry(PDO) should follow
54  the PD spec chapter 6.4.1. Required for power sink and power dual role.
55  User can specify the sink PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() defined
56  in dt-bindings/usb/pd.h.
57- op-sink-microwatt: Sink required operating power in microwatt, if source
58  can't offer the power, Capability Mismatch is set. Required for power
59  sink and power dual role.
60
61Required nodes:
62- any data bus to the connector should be modeled using the OF graph bindings
63  specified in bindings/graph.txt, unless the bus is between parent node and
64  the connector. Since single connector can have multiple data buses every bus
65  has assigned OF graph port number as follows:
66    0: High Speed (HS), present in all connectors,
67    1: Super Speed (SS), present in SS capable connectors,
68    2: Sideband use (SBU), present in USB-C.
69
70Examples
71--------
72
731. Micro-USB connector with HS lines routed via controller (MUIC):
74
75muic-max77843@66 {
76	...
77	usb_con: connector {
78		compatible = "usb-b-connector";
79		label = "micro-USB";
80		type = "micro";
81	};
82};
83
842. USB-C connector attached to CC controller (s2mm005), HS lines routed
85to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort.
86DisplayPort video lines are routed to the connector via SS mux in USB3 PHY.
87
88ccic: s2mm005@33 {
89	...
90	usb_con: connector {
91		compatible = "usb-c-connector";
92		label = "USB-C";
93
94		ports {
95			#address-cells = <1>;
96			#size-cells = <0>;
97
98			port@0 {
99				reg = <0>;
100				usb_con_hs: endpoint {
101					remote-endpoint = <&max77865_usbc_hs>;
102				};
103			};
104			port@1 {
105				reg = <1>;
106				usb_con_ss: endpoint {
107					remote-endpoint = <&usbdrd_phy_ss>;
108				};
109			};
110			port@2 {
111				reg = <2>;
112				usb_con_sbu: endpoint {
113					remote-endpoint = <&dp_aux>;
114				};
115			};
116		};
117	};
118};
119
1203. USB-C connector attached to a typec port controller(ptn5110), which has
121power delivery support and enables drp.
122
123typec: ptn5110@50 {
124	...
125	usb_con: connector {
126		compatible = "usb-c-connector";
127		label = "USB-C";
128		power-role = "dual";
129		try-power-role = "sink";
130		source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
131		sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)
132			     PDO_VAR(5000, 12000, 2000)>;
133		op-sink-microwatt = <10000000>;
134	};
135};
136