USB Connector
Schema identifier ($id): "http://devicetree.org/schemas/connector/usb-connector.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Rob Herring <robh@kernel.org>"
A USB connector node represents a physical USB connector. It should be a child of a USB interface controller or a separate node when it is attached to both MUX and USB interface controller.
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Allowed values (
enum):"usb-a-connector","usb-b-connector","usb-c-connector"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"gpio-usb-b-connector"Item 2
Exact value (
const):"usb-b-connector"
Rule 3
Array item rules (
items)Item 1
Exact value (
const):"samsung,usb-connector-11pin"Item 2
Exact value (
const):"usb-b-connector"
reg — not listed as required here #
Maximum number of items (maxItems): 1
label — not listed as required here #
Symbolic name for the connector.
type — not listed as required here #
Size of the connector, should be specified in case of non-fullsize 'usb-a-connector' or 'usb-b-connector' compatible connectors.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/string
Allowed values (enum): "mini", "micro"
self-powered — not listed as required here #
Set this property if the USB device has its own power source.
Value type (type): "boolean"
id-gpios — not listed as required here #
An input gpio for USB ID pin.
Maximum number of items (maxItems): 1
vbus-gpios — not listed as required here #
An input gpio for USB VBus pin, used to detect presence of VBUS 5V.
Maximum number of items (maxItems): 1
vbus-supply — not listed as required here #
A phandle to the regulator for USB VBUS if needed when host mode or dual role mode is supported. Particularly, if use an output GPIO to control a VBUS regulator, should model it as a regulator. See bindings/regulator/fixed-regulator.yaml
power-role — not listed as required here #
Determines the power role that the Type C connector will support. "dual" refers to Dual Role Port (DRP).
Shared schema rule ($ref): /schemas/types.yaml#/definitions/string
Allowed values (enum): "source", "sink", "dual"
try-power-role — not listed as required here #
Preferred power role.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/string
Allowed values (enum): "source", "sink", "dual"
data-role — not listed as required here #
Data role if Type C connector supports USB data. "dual" refers Dual Role Device (DRD).
Shared schema rule ($ref): /schemas/types.yaml#/definitions/string
Allowed values (enum): "host", "device", "dual"
typec-power-opmode — not listed as required here #
Determines the power operation mode that the Type C connector will support and will advertise through CC pins when it has no power delivery support. - "default" corresponds to default USB voltage and current defined by the USB 2.0 and USB 3.2 specifications, 5V 500mA for USB 2.0 ports and 5V 900mA or 1500mA for USB 3.2 ports in single-lane or dual-lane operation respectively. - "1.5A" and "3.0A", 5V 1.5A and 5V 3.0A respectively, as defined in USB Type-C Cable and Connector specification, when Power Delivery is not supported.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/string
Allowed values (enum): "default", "1.5A", "3.0A"
pd-disable — not listed as required here #
Set this property if the Type-C connector has no power delivery support.
Value type (type): "boolean"
sink-vdos — not listed as required here #
An array of u32 with each entry, a Vendor Defined Message Object (VDO), providing additional information corresponding to the product, the detailed bit definitions and the order of each VDO can be found in "USB Power Delivery Specification Revision 3.0, Version 2.0 + ECNs 2020-12-10" chapter 6.4.4.3.1 Discover Identity. User can specify the VDO array via VDO_IDH/_CERT/_PRODUCT/_UFP/_DFP/_PCABLE/_ACABLE(1/2)/_VPD() defined in dt-bindings/usb/pd.h.
Minimum number of items (minItems): 3
Maximum number of items (maxItems): 6
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
sink-vdos-v1 — not listed as required here #
An array of u32 with each entry, a Vendor Defined Message Object (VDO), providing additional information corresponding to the product, the detailed bit definitions and the order of each VDO can be found in "USB Power Delivery Specification Revision 2.0, Version 1.3" chapter 6.4.4.3.1 Discover Identity. User can specify the VDO array via VDO_IDH/_CERT/_PRODUCT/_CABLE/_AMA defined in dt-bindings/usb/pd.h.
Minimum number of items (minItems): 3
Maximum number of items (maxItems): 6
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
accessory-mode-audio — not listed as required here #
Value type (type): "boolean"
Whether the device supports Audio Adapter Accessory Mode. This is only necessary if there are no other means to discover supported alternative modes (e.g. through the UCSI firmware interface).
accessory-mode-debug — not listed as required here #
Value type (type): "boolean"
Whether the device supports Debug Accessory Mode. This is only necessary if there are no other means to discover supported alternative modes (e.g. through the UCSI firmware interface).
altmodes — not listed as required here #
Value type (type): "object"
List of Alternative Modes supported by the schematics on the particular device. This is only necessary if there are no other means to discover supported alternative modes (e.g. through the UCSI firmware interface).
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties matching a name pattern (patternProperties) #
^(displayport)$ — name matches this regular expression
Value type (type): "object"
A single USB-C Alternative Mode as supported by the USB-C connector logic.
Properties not matched by properties or patternProperties in this schema (additionalProperties)
false
Not allowed by this rule.
Properties and child nodes (properties)
svid — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint16
Unique value assigned by USB-IF to the Vendor / AltMode.
vdo — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
VDO returned by Discover Modes USB PD command.
port — not listed as required here #
Shared schema rule ($ref): /schemas/graph.yaml#/properties/port
OF graph bindings modeling a data bus to the connector, e.g. there is a single High Speed (HS) port present in this connector. If there is more than one bus (several port, with 'reg' property), they can be grouped under 'ports'.
ports — not listed as required here #
Shared schema rule ($ref): /schemas/graph.yaml#/properties/ports
OF graph bindings modeling any data bus to the connector unless the bus is between parent node and the connector. Since a single connector can have multiple data buses every bus has an assigned OF graph port number as described below.
Properties and child nodes (properties) #
port@0 — required here
Shared schema rule ($ref): /schemas/graph.yaml#/properties/port
High Speed (HS), present in all connectors.
port@1 — not listed as required here
Shared schema rule ($ref): /schemas/graph.yaml#/properties/port
Super Speed (SS), present in SS capable connectors.
port@2 — not listed as required here
Shared schema rule ($ref): /schemas/graph.yaml#/properties/port
Sideband Use (SBU), present in USB-C. This describes the alternate mode connection of which SBU is a part.
Required in this object (required): "port@0"
new-source-frs-typec-current — not listed as required here #
Initial current capability of the new source when vSafe5V is applied during PD3.0 Fast Role Swap. "Table 6-14 Fixed Supply PDO - Sink" of "USB Power Delivery Specification Revision 3.0, Version 1.2" provides the different power levels and "6.4.1.3.1.6 Fast Role Swap USB Type-C Current" provides a detailed description of the field. The sink PDO from current source reflects the current source's(i.e. transmitter of the FRS signal) power requirement during fr swap. The current sink (i.e. receiver of the FRS signal), a.k.a new source, should check if it will be able to satisfy the current source's, new sink's, requirement during frswap before enabling the frs signal reception. This property refers to maximum current capability that the current sink can satisfy. During FRS, VBUS voltage is at 5V, as the partners are in implicit contract, hence, the power level is only a function of the current capability. "1" refers to default USB power level as described by "Table 6-14 Fixed Supply PDO - Sink". "2" refers to 1.5A@5V. "3" refers to 3.0A@5V.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 1, 2, 3
slow-charger-loop — not listed as required here #
Allows PMIC charger loops which are slow(i.e. cannot meet the 15ms deadline) to still comply to pSnkStby i.e Maximum power that can be consumed by sink while in Sink Standby state as defined in 7.4.2 Sink Electrical Parameters of USB Power Delivery Specification Revision 3.0, Version 1.2. When the property is set, the port requests pSnkStby(2.5W - 5V@500mA) upon entering SNK_DISCOVERY(instead of 3A or the 1.5A, Rp current advertised, during SNK_DISCOVERY) and the actual current limit after reception of PS_Ready for PD link or during SNK_READY for non-pd link.
Value type (type): "boolean"
capabilities — not listed as required here #
A child node to contain all the selectable USB Power Delivery capabilities.
Value type (type): "object"
Properties matching a name pattern (patternProperties) #
^caps-[0-9]+$ — name matches this regular expression
Child nodes under "capabilities" node. Each node contains a selectable USB Power Delivery capability.
Value type (type): "object"
Shared schema rule ($ref): #/$defs/capabilities
Properties not evaluated by applicable rules (unevaluatedProperties)
false
Not allowed by this rule.
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
sink-wait-cap-time-ms — not listed as required here #
Represents the max time in ms that USB Type-C port (in sink role) should wait for the port partner (source role) to send source caps. SinkWaitCap timer starts when port in sink role attaches to the source. This timer will stop when sink receives PD source cap advertisement before timeout in which case it'll move to capability negotiation stage. A timeout leads to a hard reset message by the port.
Minimum value (minimum): 310
Maximum value (maximum): 620
Default value (default): 310
ps-source-off-time-ms — not listed as required here #
Represents the max time in ms that a DRP in source role should take to turn off power after the PsSourceOff timer starts. PsSourceOff timer starts when a sink's PHY layer receives EOP of the GoodCRC message (corresponding to an Accept message sent in response to a PR_Swap or a FR_Swap request). This timer stops when last bit of GoodCRC EOP corresponding to the received PS_RDY message is transmitted by the PHY layer. A timeout shall lead to error recovery in the type-c port.
Minimum value (minimum): 750
Maximum value (maximum): 920
Default value (default): 920
cc-debounce-time-ms — not listed as required here #
Represents the max time in ms that a port shall wait to determine if it's attached to a partner.
Minimum value (minimum): 100
Maximum value (maximum): 200
Default value (default): 200
sink-bc12-completion-time-ms — not listed as required here #
Represents the max time in ms that a port in sink role takes to complete Battery Charger (BC1.2) Detection. BC1.2 detection is a hardware mechanism, which in some TCPC implementations, can run in parallel once the Type-C connection state machine reaches the "potential connect as sink" state. In TCPCs where this causes delays to respond to the incoming PD messages, sink-bc12-completion-time-ms is used to delay PD negotiation till BC1.2 detection completes.
Default value (default): 0
pd-revision — not listed as required here #
Specifies the maximum USB PD revision and version supported by the connector. This property is specified in the following order; <revision_major, revision_minor, version_major, version_minor>.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-array
Maximum number of items (maxItems): 4
Property dependencies (dependencies) #
pd-disable — applies when this property is present #
Also requires: "typec-power-opmode"
sink-vdos-v1 — applies when this property is present #
Also requires: "sink-vdos"
sink-vdos — applies when this property is present #
Also requires: "sink-vdos-v1"
Required in this object (required): "compatible"
Reusable definitions ($defs) #
capabilities #
Value type (type): "object"
Properties and child nodes (properties) #
source-pdos — not listed as required here
An array of u32 with each entry providing supported power source data object(PDO), the detailed bit definitions of PDO can be found in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.2 Source_Capabilities Message, the order of each entry(PDO) should follow the PD spec chapter 6.4.1. Required for power source and power dual role. User can specify the source PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() defined in dt-bindings/usb/pd.h.
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 7
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
sink-pdos — not listed as required here
An array of u32 with each entry providing supported power sink data object(PDO), the detailed bit definitions of PDO can be found in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.3 Sink Capabilities Message, the order of each entry(PDO) should follow the PD spec chapter 6.4.1. Required for power sink and power dual role. User can specify the sink PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() defined in dt-bindings/usb/pd.h.
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 7
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
op-sink-microwatt — not listed as required here
Sink required operating power in microwatt, if source can't offer the power, Capability Mismatch is set. Required for power sink and power dual role.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):#/$defs/capabilities
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"gpio-usb-b-connector"When the condition matches (
then) #At least one of these rules must match (
anyOf)Rule 1
Rule 2
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"samsung,usb-connector-11pin"When the condition matches (
then) #Properties and child nodes (
properties)
type— not listed as required hereExact value (
const):"micro"
At least one of these rules must match (anyOf) #
Rule 1 #
This rule must not match (
not) #Required in this object (
required):"typec-power-opmode","new-source-frs-typec-current"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
muic-max77843 {
usb_con1: connector {
compatible = "usb-b-connector";
label = "micro-USB";
type = "micro";
};
};
ccic: s2mm005 {
usb_con2: connector {
compatible = "usb-c-connector";
label = "USB-C";
altmodes {
displayport {
svid = /bits/ 16 <0xff01>;
vdo = <0x00001c46>;
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
usb_con_hs: endpoint {
remote-endpoint = <&max77865_usbc_hs>;
};
};
port@1 {
reg = <1>;
usb_con_ss: endpoint {
remote-endpoint = <&usbdrd_phy_ss>;
};
};
port@2 {
reg = <2>;
usb_con_sbu: endpoint {
remote-endpoint = <&dp_aux>;
};
};
};
};
};
#include <dt-bindings/usb/pd.h>
typec: ptn5110 {
usb_con3: connector {
compatible = "usb-c-connector";
label = "USB-C";
power-role = "dual";
try-power-role = "sink";
source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)
PDO_VAR(5000, 12000, 2000)>;
op-sink-microwatt = <10000000>;
sink-wait-cap-time-ms = <465>;
ps-source-off-time-ms = <835>;
cc-debounce-time-ms = <101>;
sink-bc12-completion-time-ms = <500>;
};
};
connector {
compatible = "usb-c-connector";
label = "USB-C";
port {
high_speed_ep: endpoint {
remote-endpoint = <&usb_hs_ep>;
};
};
};
connector {
compatible = "usb-c-connector";
label = "USB-C";
data-role = "dual";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
hs_ep: endpoint {
remote-endpoint = <&usb3_hs_ep>;
};
};
port@1 {
reg = <1>;
ss_ep: endpoint {
remote-endpoint = <&hd3ss3220_in_ep>;
};
};
};
};
#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>;
};
};
muic-max77843 {
usb_con4: connector {
compatible = "samsung,usb-connector-11pin", "usb-b-connector";
label = "micro-USB";
type = "micro";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
muic_to_usb: endpoint {
remote-endpoint = <&usb_to_muic>;
};
};
port@3 {
reg = <3>;
usb_con_mhl: endpoint {
remote-endpoint = <&sii8620_mhl>;
};
};
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0-only
Line 53: The following are optional properties for "usb-b-connector".
Line 119: The following are optional properties for "usb-c-connector" with power
Line 120: delivery support.
Line 378: Micro-USB connector with HS lines routed via controller (MUIC).
Line 388: USB-C connector attached to CC controller (s2mm005), HS lines routed
Line 389: to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort.
Line 390: DisplayPort video lines are routed to the connector via SS mux in USB3 PHY.
Line 430: USB-C connector attached to a typec port controller(ptn5110), which has
Line 431: power delivery support, explicitly defines time properties and enables drp.
Line 451: USB-C connector attached to SoC with a single High-Speed controller
Line 464: USB-C connector attached to SoC and USB3 typec port controller(hd3ss3220)
Line 465: with SS 2:1 MUX. HS lines routed to SoC, SS lines routed to the MUX and
Line 466: the output of MUX is connected to the SoC.
Line 491: USB connector with GPIO control lines
Line 504: Micro-USB connector with HS lines routed via controller (MUIC) and MHL
Line 505: lines connected to HDMI-MHL bridge (sii8620) on Samsung Exynos5433-based
Line 506: mobile phone