0001 # SPDX-License-Identifier: GPL-2.0-only
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/connector/usb-connector.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: USB Connector
0008
0009 maintainers:
0010 - Rob Herring <robh@kernel.org>
0011
0012 description:
0013 A USB connector node represents a physical USB connector. It should be a child
0014 of a USB interface controller or a separate node when it is attached to both
0015 MUX and USB interface controller.
0016
0017 properties:
0018 compatible:
0019 oneOf:
0020 - enum:
0021 - usb-a-connector
0022 - usb-b-connector
0023 - usb-c-connector
0024
0025 - items:
0026 - const: gpio-usb-b-connector
0027 - const: usb-b-connector
0028
0029 - items:
0030 - const: samsung,usb-connector-11pin
0031 - const: usb-b-connector
0032
0033 label:
0034 description: Symbolic name for the connector.
0035
0036 type:
0037 description: Size of the connector, should be specified in case of
0038 non-fullsize 'usb-a-connector' or 'usb-b-connector' compatible
0039 connectors.
0040 $ref: /schemas/types.yaml#/definitions/string
0041
0042 enum:
0043 - mini
0044 - micro
0045
0046 self-powered:
0047 description: Set this property if the USB device has its own power source.
0048 type: boolean
0049
0050 # The following are optional properties for "usb-b-connector".
0051 id-gpios:
0052 description: An input gpio for USB ID pin.
0053 maxItems: 1
0054
0055 vbus-gpios:
0056 description: An input gpio for USB VBus pin, used to detect presence of
0057 VBUS 5V.
0058 maxItems: 1
0059
0060 vbus-supply:
0061 description: A phandle to the regulator for USB VBUS if needed when host
0062 mode or dual role mode is supported.
0063 Particularly, if use an output GPIO to control a VBUS regulator, should
0064 model it as a regulator. See bindings/regulator/fixed-regulator.yaml
0065
0066 # The following are optional properties for "usb-c-connector".
0067 power-role:
0068 description: Determines the power role that the Type C connector will
0069 support. "dual" refers to Dual Role Port (DRP).
0070 $ref: /schemas/types.yaml#/definitions/string
0071
0072 enum:
0073 - source
0074 - sink
0075 - dual
0076
0077 try-power-role:
0078 description: Preferred power role.
0079 $ref: /schemas/types.yaml#/definitions/string
0080
0081 enum:
0082 - source
0083 - sink
0084 - dual
0085
0086 data-role:
0087 description: Data role if Type C connector supports USB data. "dual" refers
0088 Dual Role Device (DRD).
0089 $ref: /schemas/types.yaml#/definitions/string
0090
0091 enum:
0092 - host
0093 - device
0094 - dual
0095
0096 typec-power-opmode:
0097 description: Determines the power operation mode that the Type C connector
0098 will support and will advertise through CC pins when it has no power
0099 delivery support.
0100 - "default" corresponds to default USB voltage and current defined by the
0101 USB 2.0 and USB 3.2 specifications, 5V 500mA for USB 2.0 ports and
0102 5V 900mA or 1500mA for USB 3.2 ports in single-lane or dual-lane
0103 operation respectively.
0104 - "1.5A" and "3.0A", 5V 1.5A and 5V 3.0A respectively, as defined in USB
0105 Type-C Cable and Connector specification, when Power Delivery is not
0106 supported.
0107 $ref: /schemas/types.yaml#/definitions/string
0108 enum:
0109 - default
0110 - 1.5A
0111 - 3.0A
0112
0113 pd-disable:
0114 description: Set this property if the Type-C connector has no power delivery support.
0115 type: boolean
0116
0117 # The following are optional properties for "usb-c-connector" with power
0118 # delivery support.
0119 source-pdos:
0120 description: An array of u32 with each entry providing supported power
0121 source data object(PDO), the detailed bit definitions of PDO can be found
0122 in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.2
0123 Source_Capabilities Message, the order of each entry(PDO) should follow
0124 the PD spec chapter 6.4.1. Required for power source and power dual role.
0125 User can specify the source PDO array via PDO_FIXED/BATT/VAR/PPS_APDO()
0126 defined in dt-bindings/usb/pd.h.
0127 minItems: 1
0128 maxItems: 7
0129 $ref: /schemas/types.yaml#/definitions/uint32-array
0130
0131 sink-pdos:
0132 description: An array of u32 with each entry providing supported power sink
0133 data object(PDO), the detailed bit definitions of PDO can be found in
0134 "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.3
0135 Sink Capabilities Message, the order of each entry(PDO) should follow the
0136 PD spec chapter 6.4.1. Required for power sink and power dual role. User
0137 can specify the sink PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() defined
0138 in dt-bindings/usb/pd.h.
0139 minItems: 1
0140 maxItems: 7
0141 $ref: /schemas/types.yaml#/definitions/uint32-array
0142
0143 sink-vdos:
0144 description: An array of u32 with each entry, a Vendor Defined Message Object (VDO),
0145 providing additional information corresponding to the product, the detailed bit
0146 definitions and the order of each VDO can be found in
0147 "USB Power Delivery Specification Revision 3.0, Version 2.0 + ECNs 2020-12-10"
0148 chapter 6.4.4.3.1 Discover Identity. User can specify the VDO array via
0149 VDO_IDH/_CERT/_PRODUCT/_UFP/_DFP/_PCABLE/_ACABLE(1/2)/_VPD() defined in
0150 dt-bindings/usb/pd.h.
0151 minItems: 3
0152 maxItems: 6
0153 $ref: /schemas/types.yaml#/definitions/uint32-array
0154
0155 sink-vdos-v1:
0156 description: An array of u32 with each entry, a Vendor Defined Message Object (VDO),
0157 providing additional information corresponding to the product, the detailed bit
0158 definitions and the order of each VDO can be found in
0159 "USB Power Delivery Specification Revision 2.0, Version 1.3" chapter 6.4.4.3.1 Discover
0160 Identity. User can specify the VDO array via VDO_IDH/_CERT/_PRODUCT/_CABLE/_AMA defined in
0161 dt-bindings/usb/pd.h.
0162 minItems: 3
0163 maxItems: 6
0164 $ref: /schemas/types.yaml#/definitions/uint32-array
0165
0166 op-sink-microwatt:
0167 description: Sink required operating power in microwatt, if source can't
0168 offer the power, Capability Mismatch is set. Required for power sink and
0169 power dual role.
0170
0171 ports:
0172 $ref: /schemas/graph.yaml#/properties/ports
0173 description: OF graph bindings modeling any data bus to the connector
0174 unless the bus is between parent node and the connector. Since a single
0175 connector can have multiple data buses every bus has an assigned OF graph
0176 port number as described below.
0177
0178 properties:
0179 port@0:
0180 $ref: /schemas/graph.yaml#/properties/port
0181 description: High Speed (HS), present in all connectors.
0182
0183 port@1:
0184 $ref: /schemas/graph.yaml#/properties/port
0185 description: Super Speed (SS), present in SS capable connectors.
0186
0187 port@2:
0188 $ref: /schemas/graph.yaml#/properties/port
0189 description: Sideband Use (SBU), present in USB-C. This describes the
0190 alternate mode connection of which SBU is a part.
0191
0192 required:
0193 - port@0
0194
0195 new-source-frs-typec-current:
0196 description: Initial current capability of the new source when vSafe5V
0197 is applied during PD3.0 Fast Role Swap. "Table 6-14 Fixed Supply PDO - Sink"
0198 of "USB Power Delivery Specification Revision 3.0, Version 1.2" provides the
0199 different power levels and "6.4.1.3.1.6 Fast Role Swap USB Type-C Current"
0200 provides a detailed description of the field. The sink PDO from current source
0201 reflects the current source's(i.e. transmitter of the FRS signal) power
0202 requirement during fr swap. The current sink (i.e. receiver of the FRS signal),
0203 a.k.a new source, should check if it will be able to satisfy the current source's,
0204 new sink's, requirement during frswap before enabling the frs signal reception.
0205 This property refers to maximum current capability that the current sink can
0206 satisfy. During FRS, VBUS voltage is at 5V, as the partners are in implicit
0207 contract, hence, the power level is only a function of the current capability.
0208 "1" refers to default USB power level as described by "Table 6-14 Fixed Supply PDO - Sink".
0209 "2" refers to 1.5A@5V.
0210 "3" refers to 3.0A@5V.
0211 $ref: /schemas/types.yaml#/definitions/uint32
0212 enum: [1, 2, 3]
0213
0214 slow-charger-loop:
0215 description: Allows PMIC charger loops which are slow(i.e. cannot meet the 15ms deadline) to
0216 still comply to pSnkStby i.e Maximum power that can be consumed by sink while in Sink Standby
0217 state as defined in 7.4.2 Sink Electrical Parameters of USB Power Delivery Specification
0218 Revision 3.0, Version 1.2. When the property is set, the port requests pSnkStby(2.5W -
0219 5V@500mA) upon entering SNK_DISCOVERY(instead of 3A or the 1.5A, Rp current advertised, during
0220 SNK_DISCOVERY) and the actual currrent limit after reception of PS_Ready for PD link or during
0221 SNK_READY for non-pd link.
0222 type: boolean
0223
0224 dependencies:
0225 sink-vdos-v1: [ 'sink-vdos' ]
0226 sink-vdos: [ 'sink-vdos-v1' ]
0227
0228 required:
0229 - compatible
0230
0231 allOf:
0232 - if:
0233 properties:
0234 compatible:
0235 contains:
0236 const: gpio-usb-b-connector
0237 then:
0238 anyOf:
0239 - required:
0240 - vbus-gpios
0241 - required:
0242 - id-gpios
0243
0244 - if:
0245 properties:
0246 compatible:
0247 contains:
0248 const: samsung,usb-connector-11pin
0249 then:
0250 properties:
0251 type:
0252 const: micro
0253
0254 anyOf:
0255 - not:
0256 required:
0257 - typec-power-opmode
0258 - new-source-frs-typec-current
0259
0260 additionalProperties: true
0261
0262 examples:
0263 # Micro-USB connector with HS lines routed via controller (MUIC).
0264 - |
0265 muic-max77843 {
0266 usb_con1: connector {
0267 compatible = "usb-b-connector";
0268 label = "micro-USB";
0269 type = "micro";
0270 };
0271 };
0272
0273 # USB-C connector attached to CC controller (s2mm005), HS lines routed
0274 # to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort.
0275 # DisplayPort video lines are routed to the connector via SS mux in USB3 PHY.
0276 - |
0277 ccic: s2mm005 {
0278 usb_con2: connector {
0279 compatible = "usb-c-connector";
0280 label = "USB-C";
0281
0282 ports {
0283 #address-cells = <1>;
0284 #size-cells = <0>;
0285
0286 port@0 {
0287 reg = <0>;
0288 usb_con_hs: endpoint {
0289 remote-endpoint = <&max77865_usbc_hs>;
0290 };
0291 };
0292 port@1 {
0293 reg = <1>;
0294 usb_con_ss: endpoint {
0295 remote-endpoint = <&usbdrd_phy_ss>;
0296 };
0297 };
0298 port@2 {
0299 reg = <2>;
0300 usb_con_sbu: endpoint {
0301 remote-endpoint = <&dp_aux>;
0302 };
0303 };
0304 };
0305 };
0306 };
0307
0308 # USB-C connector attached to a typec port controller(ptn5110), which has
0309 # power delivery support and enables drp.
0310 - |
0311 #include <dt-bindings/usb/pd.h>
0312 typec: ptn5110 {
0313 usb_con3: connector {
0314 compatible = "usb-c-connector";
0315 label = "USB-C";
0316 power-role = "dual";
0317 try-power-role = "sink";
0318 source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
0319 sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)
0320 PDO_VAR(5000, 12000, 2000)>;
0321 op-sink-microwatt = <10000000>;
0322 };
0323 };
0324
0325 # USB-C connector attached to SoC and USB3 typec port controller(hd3ss3220)
0326 # with SS 2:1 MUX. HS lines routed to SoC, SS lines routed to the MUX and
0327 # the output of MUX is connected to the SoC.
0328 - |
0329 connector {
0330 compatible = "usb-c-connector";
0331 label = "USB-C";
0332 data-role = "dual";
0333
0334 ports {
0335 #address-cells = <1>;
0336 #size-cells = <0>;
0337 port@0 {
0338 reg = <0>;
0339 hs_ep: endpoint {
0340 remote-endpoint = <&usb3_hs_ep>;
0341 };
0342 };
0343 port@1 {
0344 reg = <1>;
0345 ss_ep: endpoint {
0346 remote-endpoint = <&hd3ss3220_in_ep>;
0347 };
0348 };
0349 };
0350 };
0351
0352 # USB connector with GPIO control lines
0353 - |
0354 #include <dt-bindings/gpio/gpio.h>
0355
0356 usb {
0357 connector {
0358 compatible = "gpio-usb-b-connector", "usb-b-connector";
0359 type = "micro";
0360 id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>;
0361 vbus-supply = <&usb_p0_vbus>;
0362 };
0363 };
0364
0365 # Micro-USB connector with HS lines routed via controller (MUIC) and MHL
0366 # lines connected to HDMI-MHL bridge (sii8620) on Samsung Exynos5433-based
0367 # mobile phone
0368 - |
0369 muic-max77843 {
0370 usb_con4: connector {
0371 compatible = "samsung,usb-connector-11pin", "usb-b-connector";
0372 label = "micro-USB";
0373 type = "micro";
0374
0375 ports {
0376 #address-cells = <1>;
0377 #size-cells = <0>;
0378
0379 port@0 {
0380 reg = <0>;
0381 muic_to_usb: endpoint {
0382 remote-endpoint = <&usb_to_muic>;
0383 };
0384 };
0385 port@3 {
0386 reg = <3>;
0387 usb_con_mhl: endpoint {
0388 remote-endpoint = <&sii8620_mhl>;
0389 };
0390 };
0391 };
0392 };
0393 };