Path: blob/main/sys/contrib/device-tree/Bindings/connector/usb-connector.yaml
48378 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: false254255dependencies:256sink-vdos-v1: [ sink-vdos ]257sink-vdos: [ sink-vdos-v1 ]258259required:260- compatible261262$defs:263capabilities:264type: object265266properties:267source-pdos:268description: An array of u32 with each entry providing supported power269source data object(PDO), the detailed bit definitions of PDO can be found270in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.2271Source_Capabilities Message, the order of each entry(PDO) should follow272the PD spec chapter 6.4.1. Required for power source and power dual role.273User can specify the source PDO array via PDO_FIXED/BATT/VAR/PPS_APDO()274defined in dt-bindings/usb/pd.h.275minItems: 1276maxItems: 7277$ref: /schemas/types.yaml#/definitions/uint32-array278279sink-pdos:280description: An array of u32 with each entry providing supported power sink281data object(PDO), the detailed bit definitions of PDO can be found in282"Universal Serial Bus Power Delivery Specification" chapter 6.4.1.3283Sink Capabilities Message, the order of each entry(PDO) should follow the284PD spec chapter 6.4.1. Required for power sink and power dual role. User285can specify the sink PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() defined286in dt-bindings/usb/pd.h.287minItems: 1288maxItems: 7289$ref: /schemas/types.yaml#/definitions/uint32-array290291op-sink-microwatt:292description: Sink required operating power in microwatt, if source can't293offer the power, Capability Mismatch is set. Required for power sink and294power dual role.295296allOf:297- $ref: "#/$defs/capabilities"298- if:299properties:300compatible:301contains:302const: gpio-usb-b-connector303then:304anyOf:305- required:306- vbus-gpios307- required:308- id-gpios309310- if:311properties:312compatible:313contains:314const: samsung,usb-connector-11pin315then:316properties:317type:318const: micro319320anyOf:321- not:322required:323- typec-power-opmode324- new-source-frs-typec-current325326unevaluatedProperties: false327328examples:329# Micro-USB connector with HS lines routed via controller (MUIC).330- |331muic-max77843 {332usb_con1: connector {333compatible = "usb-b-connector";334label = "micro-USB";335type = "micro";336};337};338339# USB-C connector attached to CC controller (s2mm005), HS lines routed340# to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort.341# DisplayPort video lines are routed to the connector via SS mux in USB3 PHY.342- |343ccic: s2mm005 {344usb_con2: connector {345compatible = "usb-c-connector";346label = "USB-C";347348altmodes {349displayport {350svid = /bits/ 16 <0xff01>;351vdo = <0x00001c46>;352};353};354355ports {356#address-cells = <1>;357#size-cells = <0>;358359port@0 {360reg = <0>;361usb_con_hs: endpoint {362remote-endpoint = <&max77865_usbc_hs>;363};364};365port@1 {366reg = <1>;367usb_con_ss: endpoint {368remote-endpoint = <&usbdrd_phy_ss>;369};370};371port@2 {372reg = <2>;373usb_con_sbu: endpoint {374remote-endpoint = <&dp_aux>;375};376};377};378};379};380381# USB-C connector attached to a typec port controller(ptn5110), which has382# power delivery support and enables drp.383- |384#include <dt-bindings/usb/pd.h>385typec: ptn5110 {386usb_con3: connector {387compatible = "usb-c-connector";388label = "USB-C";389power-role = "dual";390try-power-role = "sink";391source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;392sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)393PDO_VAR(5000, 12000, 2000)>;394op-sink-microwatt = <10000000>;395};396};397398# USB-C connector attached to SoC with a single High-Speed controller399- |400connector {401compatible = "usb-c-connector";402label = "USB-C";403404port {405high_speed_ep: endpoint {406remote-endpoint = <&usb_hs_ep>;407};408};409};410411# USB-C connector attached to SoC and USB3 typec port controller(hd3ss3220)412# with SS 2:1 MUX. HS lines routed to SoC, SS lines routed to the MUX and413# the output of MUX is connected to the SoC.414- |415connector {416compatible = "usb-c-connector";417label = "USB-C";418data-role = "dual";419420ports {421#address-cells = <1>;422#size-cells = <0>;423port@0 {424reg = <0>;425hs_ep: endpoint {426remote-endpoint = <&usb3_hs_ep>;427};428};429port@1 {430reg = <1>;431ss_ep: endpoint {432remote-endpoint = <&hd3ss3220_in_ep>;433};434};435};436};437438# USB connector with GPIO control lines439- |440#include <dt-bindings/gpio/gpio.h>441442usb {443connector {444compatible = "gpio-usb-b-connector", "usb-b-connector";445type = "micro";446id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>;447vbus-supply = <&usb_p0_vbus>;448};449};450451# Micro-USB connector with HS lines routed via controller (MUIC) and MHL452# lines connected to HDMI-MHL bridge (sii8620) on Samsung Exynos5433-based453# mobile phone454- |455muic-max77843 {456usb_con4: connector {457compatible = "samsung,usb-connector-11pin", "usb-b-connector";458label = "micro-USB";459type = "micro";460461ports {462#address-cells = <1>;463#size-cells = <0>;464465port@0 {466reg = <0>;467muic_to_usb: endpoint {468remote-endpoint = <&usb_to_muic>;469};470};471port@3 {472reg = <3>;473usb_con_mhl: endpoint {474remote-endpoint = <&sii8620_mhl>;475};476};477};478};479};480481482