Path: blob/master/Documentation/devicetree/bindings/connector/usb-connector.yaml
26308 views
# SPDX-License-Identifier: GPL-2.0-only1%YAML 1.22---3$id: http://devicetree.org/schemas/connector/usb-connector.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: USB Connector78maintainers:9- Rob Herring <robh@kernel.org>1011description:12A USB connector node represents a physical USB connector. It should be a child13of a USB interface controller or a separate node when it is attached to both14MUX and USB interface controller.1516properties:17compatible:18oneOf:19- enum:20- usb-a-connector21- usb-b-connector22- usb-c-connector2324- items:25- const: gpio-usb-b-connector26- const: usb-b-connector2728- items:29- const: samsung,usb-connector-11pin30- const: usb-b-connector3132reg:33maxItems: 13435label:36description: Symbolic name for the connector.3738type:39description: Size of the connector, should be specified in case of40non-fullsize 'usb-a-connector' or 'usb-b-connector' compatible41connectors.42$ref: /schemas/types.yaml#/definitions/string4344enum:45- mini46- micro4748self-powered:49description: Set this property if the USB device has its own power source.50type: boolean5152# The following are optional properties for "usb-b-connector".53id-gpios:54description: An input gpio for USB ID pin.55maxItems: 15657vbus-gpios:58description: An input gpio for USB VBus pin, used to detect presence of59VBUS 5V.60maxItems: 16162vbus-supply:63description: A phandle to the regulator for USB VBUS if needed when host64mode or dual role mode is supported.65Particularly, if use an output GPIO to control a VBUS regulator, should66model it as a regulator. See bindings/regulator/fixed-regulator.yaml6768power-role:69description: Determines the power role that the Type C connector will70support. "dual" refers to Dual Role Port (DRP).71$ref: /schemas/types.yaml#/definitions/string7273enum:74- source75- sink76- dual7778try-power-role:79description: Preferred power role.80$ref: /schemas/types.yaml#/definitions/string8182enum:83- source84- sink85- dual8687data-role:88description: Data role if Type C connector supports USB data. "dual" refers89Dual Role Device (DRD).90$ref: /schemas/types.yaml#/definitions/string9192enum:93- host94- device95- dual9697typec-power-opmode:98description: Determines the power operation mode that the Type C connector99will support and will advertise through CC pins when it has no power100delivery support.101- "default" corresponds to default USB voltage and current defined by the102USB 2.0 and USB 3.2 specifications, 5V 500mA for USB 2.0 ports and1035V 900mA or 1500mA for USB 3.2 ports in single-lane or dual-lane104operation respectively.105- "1.5A" and "3.0A", 5V 1.5A and 5V 3.0A respectively, as defined in USB106Type-C Cable and Connector specification, when Power Delivery is not107supported.108$ref: /schemas/types.yaml#/definitions/string109enum:110- default111- 1.5A112- 3.0A113114pd-disable:115description: Set this property if the Type-C connector has no power delivery support.116type: boolean117118# The following are optional properties for "usb-c-connector" with power119# delivery support.120sink-vdos:121description: An array of u32 with each entry, a Vendor Defined Message Object (VDO),122providing additional information corresponding to the product, the detailed bit123definitions and the order of each VDO can be found in124"USB Power Delivery Specification Revision 3.0, Version 2.0 + ECNs 2020-12-10"125chapter 6.4.4.3.1 Discover Identity. User can specify the VDO array via126VDO_IDH/_CERT/_PRODUCT/_UFP/_DFP/_PCABLE/_ACABLE(1/2)/_VPD() defined in127dt-bindings/usb/pd.h.128minItems: 3129maxItems: 6130$ref: /schemas/types.yaml#/definitions/uint32-array131132sink-vdos-v1:133description: An array of u32 with each entry, a Vendor Defined Message Object (VDO),134providing additional information corresponding to the product, the detailed bit135definitions and the order of each VDO can be found in136"USB Power Delivery Specification Revision 2.0, Version 1.3" chapter 6.4.4.3.1 Discover137Identity. User can specify the VDO array via VDO_IDH/_CERT/_PRODUCT/_CABLE/_AMA defined in138dt-bindings/usb/pd.h.139minItems: 3140maxItems: 6141$ref: /schemas/types.yaml#/definitions/uint32-array142143accessory-mode-audio:144type: boolean145description: Whether the device supports Audio Adapter Accessory Mode. This146is only necessary if there are no other means to discover supported147alternative modes (e.g. through the UCSI firmware interface).148149accessory-mode-debug:150type: boolean151description: Whether the device supports Debug Accessory Mode. This152is only necessary if there are no other means to discover supported153alternative modes (e.g. through the UCSI firmware interface).154155altmodes:156type: object157description: List of Alternative Modes supported by the schematics on the158particular device. This is only necessary if there are no other means to159discover supported alternative modes (e.g. through the UCSI firmware160interface).161162additionalProperties: false163164patternProperties:165"^(displayport)$":166type: object167description:168A single USB-C Alternative Mode as supported by the USB-C connector logic.169170additionalProperties: false171172properties:173svid:174$ref: /schemas/types.yaml#/definitions/uint16175description: Unique value assigned by USB-IF to the Vendor / AltMode.176enum: [ 0xff01 ]177vdo:178$ref: /schemas/types.yaml#/definitions/uint32179description: VDO returned by Discover Modes USB PD command.180181port:182$ref: /schemas/graph.yaml#/properties/port183description: OF graph bindings modeling a data bus to the connector, e.g.184there is a single High Speed (HS) port present in this connector. If there185is more than one bus (several port, with 'reg' property), they can be grouped186under 'ports'.187188ports:189$ref: /schemas/graph.yaml#/properties/ports190description: OF graph bindings modeling any data bus to the connector191unless the bus is between parent node and the connector. Since a single192connector can have multiple data buses every bus has an assigned OF graph193port number as described below.194195properties:196port@0:197$ref: /schemas/graph.yaml#/properties/port198description: High Speed (HS), present in all connectors.199200port@1:201$ref: /schemas/graph.yaml#/properties/port202description: Super Speed (SS), present in SS capable connectors.203204port@2:205$ref: /schemas/graph.yaml#/properties/port206description: Sideband Use (SBU), present in USB-C. This describes the207alternate mode connection of which SBU is a part.208209required:210- port@0211212new-source-frs-typec-current:213description: Initial current capability of the new source when vSafe5V214is applied during PD3.0 Fast Role Swap. "Table 6-14 Fixed Supply PDO - Sink"215of "USB Power Delivery Specification Revision 3.0, Version 1.2" provides the216different power levels and "6.4.1.3.1.6 Fast Role Swap USB Type-C Current"217provides a detailed description of the field. The sink PDO from current source218reflects the current source's(i.e. transmitter of the FRS signal) power219requirement during fr swap. The current sink (i.e. receiver of the FRS signal),220a.k.a new source, should check if it will be able to satisfy the current source's,221new sink's, requirement during frswap before enabling the frs signal reception.222This property refers to maximum current capability that the current sink can223satisfy. During FRS, VBUS voltage is at 5V, as the partners are in implicit224contract, hence, the power level is only a function of the current capability.225"1" refers to default USB power level as described by "Table 6-14 Fixed Supply PDO - Sink".226"2" refers to 1.5A@5V.227"3" refers to 3.0A@5V.228$ref: /schemas/types.yaml#/definitions/uint32229enum: [1, 2, 3]230231slow-charger-loop:232description: Allows PMIC charger loops which are slow(i.e. cannot meet the 15ms deadline) to233still comply to pSnkStby i.e Maximum power that can be consumed by sink while in Sink Standby234state as defined in 7.4.2 Sink Electrical Parameters of USB Power Delivery Specification235Revision 3.0, Version 1.2. When the property is set, the port requests pSnkStby(2.5W -2365V@500mA) upon entering SNK_DISCOVERY(instead of 3A or the 1.5A, Rp current advertised, during237SNK_DISCOVERY) and the actual current limit after reception of PS_Ready for PD link or during238SNK_READY for non-pd link.239type: boolean240241capabilities:242description: A child node to contain all the selectable USB Power Delivery capabilities.243type: object244245patternProperties:246"^caps-[0-9]+$":247description: Child nodes under "capabilities" node. Each node contains a selectable USB248Power Delivery capability.249type: object250$ref: "#/$defs/capabilities"251unevaluatedProperties: false252253additionalProperties: false254255sink-wait-cap-time-ms:256description: Represents the max time in ms that USB Type-C port (in sink257role) should wait for the port partner (source role) to send source caps.258SinkWaitCap timer starts when port in sink role attaches to the source.259This timer will stop when sink receives PD source cap advertisement before260timeout in which case it'll move to capability negotiation stage. A261timeout leads to a hard reset message by the port.262minimum: 310263maximum: 620264default: 310265266ps-source-off-time-ms:267description: Represents the max time in ms that a DRP in source role should268take to turn off power after the PsSourceOff timer starts. PsSourceOff269timer starts when a sink's PHY layer receives EOP of the GoodCRC message270(corresponding to an Accept message sent in response to a PR_Swap or a271FR_Swap request). This timer stops when last bit of GoodCRC EOP272corresponding to the received PS_RDY message is transmitted by the PHY273layer. A timeout shall lead to error recovery in the type-c port.274minimum: 750275maximum: 920276default: 920277278cc-debounce-time-ms:279description: Represents the max time in ms that a port shall wait to280determine if it's attached to a partner.281minimum: 100282maximum: 200283default: 200284285sink-bc12-completion-time-ms:286description: Represents the max time in ms that a port in sink role takes287to complete Battery Charger (BC1.2) Detection. BC1.2 detection is a288hardware mechanism, which in some TCPC implementations, can run in289parallel once the Type-C connection state machine reaches the "potential290connect as sink" state. In TCPCs where this causes delays to respond to291the incoming PD messages, sink-bc12-completion-time-ms is used to delay292PD negotiation till BC1.2 detection completes.293default: 0294295pd-revision:296description: Specifies the maximum USB PD revision and version supported by297the connector. This property is specified in the following order;298<revision_major, revision_minor, version_major, version_minor>.299$ref: /schemas/types.yaml#/definitions/uint8-array300maxItems: 4301302dependencies:303sink-vdos-v1: [ sink-vdos ]304sink-vdos: [ sink-vdos-v1 ]305306required:307- compatible308309$defs:310capabilities:311type: object312313properties:314source-pdos:315description: An array of u32 with each entry providing supported power316source data object(PDO), the detailed bit definitions of PDO can be found317in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.2318Source_Capabilities Message, the order of each entry(PDO) should follow319the PD spec chapter 6.4.1. Required for power source and power dual role.320User can specify the source PDO array via PDO_FIXED/BATT/VAR/PPS_APDO()321defined in dt-bindings/usb/pd.h.322minItems: 1323maxItems: 7324$ref: /schemas/types.yaml#/definitions/uint32-array325326sink-pdos:327description: An array of u32 with each entry providing supported power sink328data object(PDO), the detailed bit definitions of PDO can be found in329"Universal Serial Bus Power Delivery Specification" chapter 6.4.1.3330Sink Capabilities Message, the order of each entry(PDO) should follow the331PD spec chapter 6.4.1. Required for power sink and power dual role. User332can specify the sink PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() defined333in dt-bindings/usb/pd.h.334minItems: 1335maxItems: 7336$ref: /schemas/types.yaml#/definitions/uint32-array337338op-sink-microwatt:339description: Sink required operating power in microwatt, if source can't340offer the power, Capability Mismatch is set. Required for power sink and341power dual role.342343allOf:344- $ref: "#/$defs/capabilities"345- if:346properties:347compatible:348contains:349const: gpio-usb-b-connector350then:351anyOf:352- required:353- vbus-gpios354- required:355- id-gpios356357- if:358properties:359compatible:360contains:361const: samsung,usb-connector-11pin362then:363properties:364type:365const: micro366367anyOf:368- not:369required:370- typec-power-opmode371- new-source-frs-typec-current372373unevaluatedProperties: false374375examples:376# Micro-USB connector with HS lines routed via controller (MUIC).377- |378muic-max77843 {379usb_con1: connector {380compatible = "usb-b-connector";381label = "micro-USB";382type = "micro";383};384};385386# USB-C connector attached to CC controller (s2mm005), HS lines routed387# to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort.388# DisplayPort video lines are routed to the connector via SS mux in USB3 PHY.389- |390ccic: s2mm005 {391usb_con2: connector {392compatible = "usb-c-connector";393label = "USB-C";394395altmodes {396displayport {397svid = /bits/ 16 <0xff01>;398vdo = <0x00001c46>;399};400};401402ports {403#address-cells = <1>;404#size-cells = <0>;405406port@0 {407reg = <0>;408usb_con_hs: endpoint {409remote-endpoint = <&max77865_usbc_hs>;410};411};412port@1 {413reg = <1>;414usb_con_ss: endpoint {415remote-endpoint = <&usbdrd_phy_ss>;416};417};418port@2 {419reg = <2>;420usb_con_sbu: endpoint {421remote-endpoint = <&dp_aux>;422};423};424};425};426};427428# USB-C connector attached to a typec port controller(ptn5110), which has429# power delivery support, explicitly defines time properties and enables drp.430- |431#include <dt-bindings/usb/pd.h>432typec: ptn5110 {433usb_con3: connector {434compatible = "usb-c-connector";435label = "USB-C";436power-role = "dual";437try-power-role = "sink";438source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;439sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)440PDO_VAR(5000, 12000, 2000)>;441op-sink-microwatt = <10000000>;442sink-wait-cap-time-ms = <465>;443ps-source-off-time-ms = <835>;444cc-debounce-time-ms = <101>;445sink-bc12-completion-time-ms = <500>;446};447};448449# USB-C connector attached to SoC with a single High-Speed controller450- |451connector {452compatible = "usb-c-connector";453label = "USB-C";454455port {456high_speed_ep: endpoint {457remote-endpoint = <&usb_hs_ep>;458};459};460};461462# USB-C connector attached to SoC and USB3 typec port controller(hd3ss3220)463# with SS 2:1 MUX. HS lines routed to SoC, SS lines routed to the MUX and464# the output of MUX is connected to the SoC.465- |466connector {467compatible = "usb-c-connector";468label = "USB-C";469data-role = "dual";470471ports {472#address-cells = <1>;473#size-cells = <0>;474port@0 {475reg = <0>;476hs_ep: endpoint {477remote-endpoint = <&usb3_hs_ep>;478};479};480port@1 {481reg = <1>;482ss_ep: endpoint {483remote-endpoint = <&hd3ss3220_in_ep>;484};485};486};487};488489# USB connector with GPIO control lines490- |491#include <dt-bindings/gpio/gpio.h>492493usb {494connector {495compatible = "gpio-usb-b-connector", "usb-b-connector";496type = "micro";497id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>;498vbus-supply = <&usb_p0_vbus>;499};500};501502# Micro-USB connector with HS lines routed via controller (MUIC) and MHL503# lines connected to HDMI-MHL bridge (sii8620) on Samsung Exynos5433-based504# mobile phone505- |506muic-max77843 {507usb_con4: connector {508compatible = "samsung,usb-connector-11pin", "usb-b-connector";509label = "micro-USB";510type = "micro";511512ports {513#address-cells = <1>;514#size-cells = <0>;515516port@0 {517reg = <0>;518muic_to_usb: endpoint {519remote-endpoint = <&usb_to_muic>;520};521};522port@3 {523reg = <3>;524usb_con_mhl: endpoint {525remote-endpoint = <&sii8620_mhl>;526};527};528};529};530};531532533