Merge tag 'libnvdimm-fixes-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / connector / usb-connector.txt
1 USB Connector
2 =============
3
4 USB connector node represents physical USB connector. It should be
5 a child of USB interface controller.
6
7 Required 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
13 Optional 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
20 Optional properties for usb-c-connector:
21 - power-role: should be one of "source", "sink" or "dual"(DRP) if typec
22   connector has power support.
23 - try-power-role: preferred power role if "dual"(DRP) can support Try.SNK
24   or Try.SRC, should be "sink" for Try.SNK or "source" for Try.SRC.
25 - data-role: should be one of "host", "device", "dual"(DRD) if typec
26   connector supports USB data.
27
28 Required properties for usb-c-connector with power delivery support:
29 - source-pdos: An array of u32 with each entry providing supported power
30   source data object(PDO), the detailed bit definitions of PDO can be found
31   in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.2
32   Source_Capabilities Message, the order of each entry(PDO) should follow
33   the PD spec chapter 6.4.1. Required for power source and power dual role.
34   User can specify the source PDO array via PDO_FIXED/BATT/VAR/PPS_APDO()
35   defined in dt-bindings/usb/pd.h.
36 - sink-pdos: An array of u32 with each entry providing supported power
37   sink data object(PDO), the detailed bit definitions of PDO can be found
38   in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.3
39   Sink Capabilities Message, the order of each entry(PDO) should follow
40   the PD spec chapter 6.4.1. Required for power sink and power dual role.
41   User can specify the sink PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() defined
42   in dt-bindings/usb/pd.h.
43 - op-sink-microwatt: Sink required operating power in microwatt, if source
44   can't offer the power, Capability Mismatch is set. Required for power
45   sink and power dual role.
46
47 Required nodes:
48 - any data bus to the connector should be modeled using the OF graph bindings
49   specified in bindings/graph.txt, unless the bus is between parent node and
50   the connector. Since single connector can have multiple data buses every bus
51   has assigned OF graph port number as follows:
52     0: High Speed (HS), present in all connectors,
53     1: Super Speed (SS), present in SS capable connectors,
54     2: Sideband use (SBU), present in USB-C.
55
56 Examples
57 --------
58
59 1. Micro-USB connector with HS lines routed via controller (MUIC):
60
61 muic-max77843@66 {
62         ...
63         usb_con: connector {
64                 compatible = "usb-b-connector";
65                 label = "micro-USB";
66                 type = "micro";
67         };
68 };
69
70 2. USB-C connector attached to CC controller (s2mm005), HS lines routed
71 to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort.
72 DisplayPort video lines are routed to the connector via SS mux in USB3 PHY.
73
74 ccic: s2mm005@33 {
75         ...
76         usb_con: connector {
77                 compatible = "usb-c-connector";
78                 label = "USB-C";
79
80                 ports {
81                         #address-cells = <1>;
82                         #size-cells = <0>;
83
84                         port@0 {
85                                 reg = <0>;
86                                 usb_con_hs: endpoint {
87                                         remote-endpoint = <&max77865_usbc_hs>;
88                                 };
89                         };
90                         port@1 {
91                                 reg = <1>;
92                                 usb_con_ss: endpoint {
93                                         remote-endpoint = <&usbdrd_phy_ss>;
94                                 };
95                         };
96                         port@2 {
97                                 reg = <2>;
98                                 usb_con_sbu: endpoint {
99                                         remote-endpoint = <&dp_aux>;
100                                 };
101                         };
102                 };
103         };
104 };
105
106 3. USB-C connector attached to a typec port controller(ptn5110), which has
107 power delivery support and enables drp.
108
109 typec: ptn5110@50 {
110         ...
111         usb_con: connector {
112                 compatible = "usb-c-connector";
113                 label = "USB-C";
114                 power-role = "dual";
115                 try-power-role = "sink";
116                 source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
117                 sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)
118                              PDO_VAR(5000, 12000, 2000)>;
119                 op-sink-microwatt = <10000000>;
120         };
121 };