1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only 2*4882a593Smuzhiyun%YAML 1.2 3*4882a593Smuzhiyun--- 4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/connector/usb-connector.yaml# 5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyuntitle: USB Connector 8*4882a593Smuzhiyun 9*4882a593Smuzhiyunmaintainers: 10*4882a593Smuzhiyun - Rob Herring <robh@kernel.org> 11*4882a593Smuzhiyun 12*4882a593Smuzhiyundescription: 13*4882a593Smuzhiyun A USB connector node represents a physical USB connector. It should be a child 14*4882a593Smuzhiyun of a USB interface controller or a separate node when it is attached to both 15*4882a593Smuzhiyun MUX and USB interface controller. 16*4882a593Smuzhiyun 17*4882a593Smuzhiyunproperties: 18*4882a593Smuzhiyun compatible: 19*4882a593Smuzhiyun oneOf: 20*4882a593Smuzhiyun - enum: 21*4882a593Smuzhiyun - usb-a-connector 22*4882a593Smuzhiyun - usb-b-connector 23*4882a593Smuzhiyun - usb-c-connector 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun - items: 26*4882a593Smuzhiyun - const: gpio-usb-b-connector 27*4882a593Smuzhiyun - const: usb-b-connector 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun - items: 30*4882a593Smuzhiyun - const: samsung,usb-connector-11pin 31*4882a593Smuzhiyun - const: usb-b-connector 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun label: 34*4882a593Smuzhiyun description: Symbolic name for the connector. 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun type: 37*4882a593Smuzhiyun description: Size of the connector, should be specified in case of 38*4882a593Smuzhiyun non-fullsize 'usb-a-connector' or 'usb-b-connector' compatible 39*4882a593Smuzhiyun connectors. 40*4882a593Smuzhiyun $ref: /schemas/types.yaml#definitions/string 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun enum: 43*4882a593Smuzhiyun - mini 44*4882a593Smuzhiyun - micro 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun self-powered: 47*4882a593Smuzhiyun description: Set this property if the USB device has its own power source. 48*4882a593Smuzhiyun type: boolean 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun # The following are optional properties for "usb-b-connector". 51*4882a593Smuzhiyun id-gpios: 52*4882a593Smuzhiyun description: An input gpio for USB ID pin. 53*4882a593Smuzhiyun maxItems: 1 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun vbus-gpios: 56*4882a593Smuzhiyun description: An input gpio for USB VBus pin, used to detect presence of 57*4882a593Smuzhiyun VBUS 5V. 58*4882a593Smuzhiyun maxItems: 1 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun vbus-supply: 61*4882a593Smuzhiyun description: A phandle to the regulator for USB VBUS if needed when host 62*4882a593Smuzhiyun mode or dual role mode is supported. 63*4882a593Smuzhiyun Particularly, if use an output GPIO to control a VBUS regulator, should 64*4882a593Smuzhiyun model it as a regulator. See bindings/regulator/fixed-regulator.yaml 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun # The following are optional properties for "usb-c-connector". 67*4882a593Smuzhiyun power-role: 68*4882a593Smuzhiyun description: Determines the power role that the Type C connector will 69*4882a593Smuzhiyun support. "dual" refers to Dual Role Port (DRP). 70*4882a593Smuzhiyun $ref: /schemas/types.yaml#definitions/string 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun enum: 73*4882a593Smuzhiyun - source 74*4882a593Smuzhiyun - sink 75*4882a593Smuzhiyun - dual 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun try-power-role: 78*4882a593Smuzhiyun description: Preferred power role. 79*4882a593Smuzhiyun $ref: /schemas/types.yaml#definitions/string 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun enum: 82*4882a593Smuzhiyun - source 83*4882a593Smuzhiyun - sink 84*4882a593Smuzhiyun - dual 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun data-role: 87*4882a593Smuzhiyun description: Data role if Type C connector supports USB data. "dual" refers 88*4882a593Smuzhiyun Dual Role Device (DRD). 89*4882a593Smuzhiyun $ref: /schemas/types.yaml#definitions/string 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun enum: 92*4882a593Smuzhiyun - host 93*4882a593Smuzhiyun - device 94*4882a593Smuzhiyun - dual 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun pd-revision: 97*4882a593Smuzhiyun description: Set the maximum PD revision of Type-C controller can support, 98*4882a593Smuzhiyun the descriptors are compliant in binary-coded decimal (i.e. 2.0 is 0200H 99*4882a593Smuzhiyun and 3.1 is 0310H). 100*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 101*4882a593Smuzhiyun 102*4882a593Smuzhiyun # The following are optional properties for "usb-c-connector" with power 103*4882a593Smuzhiyun # delivery support. 104*4882a593Smuzhiyun source-pdos: 105*4882a593Smuzhiyun description: An array of u32 with each entry providing supported power 106*4882a593Smuzhiyun source data object(PDO), the detailed bit definitions of PDO can be found 107*4882a593Smuzhiyun in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.2 108*4882a593Smuzhiyun Source_Capabilities Message, the order of each entry(PDO) should follow 109*4882a593Smuzhiyun the PD spec chapter 6.4.1. Required for power source and power dual role. 110*4882a593Smuzhiyun User can specify the source PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() 111*4882a593Smuzhiyun defined in dt-bindings/usb/pd.h. 112*4882a593Smuzhiyun minItems: 1 113*4882a593Smuzhiyun maxItems: 7 114*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32-array 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun sink-pdos: 117*4882a593Smuzhiyun description: An array of u32 with each entry providing supported power sink 118*4882a593Smuzhiyun data object(PDO), the detailed bit definitions of PDO can be found in 119*4882a593Smuzhiyun "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.3 120*4882a593Smuzhiyun Sink Capabilities Message, the order of each entry(PDO) should follow the 121*4882a593Smuzhiyun PD spec chapter 6.4.1. Required for power sink and power dual role. User 122*4882a593Smuzhiyun can specify the sink PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() defined 123*4882a593Smuzhiyun in dt-bindings/usb/pd.h. 124*4882a593Smuzhiyun minItems: 1 125*4882a593Smuzhiyun maxItems: 7 126*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32-array 127*4882a593Smuzhiyun 128*4882a593Smuzhiyun sink-vdos: 129*4882a593Smuzhiyun description: An array of u32 with each entry, a Vendor Defined Message Object (VDO), 130*4882a593Smuzhiyun providing additional information corresponding to the product, the detailed bit 131*4882a593Smuzhiyun definitions and the order of each VDO can be found in 132*4882a593Smuzhiyun "USB Power Delivery Specification Revision 3.0, Version 2.0 + ECNs 2020-12-10" 133*4882a593Smuzhiyun chapter 6.4.4.3.1 Discover Identity. User can specify the VDO array via 134*4882a593Smuzhiyun VDO_IDH/_CERT/_PRODUCT/_UFP/_DFP/_PCABLE/_ACABLE(1/2)/_VPD() defined in 135*4882a593Smuzhiyun dt-bindings/usb/pd.h. 136*4882a593Smuzhiyun minItems: 3 137*4882a593Smuzhiyun maxItems: 6 138*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32-array 139*4882a593Smuzhiyun 140*4882a593Smuzhiyun sink-vdos-v1: 141*4882a593Smuzhiyun description: An array of u32 with each entry, a Vendor Defined Message Object (VDO), 142*4882a593Smuzhiyun providing additional information corresponding to the product, the detailed bit 143*4882a593Smuzhiyun definitions and the order of each VDO can be found in 144*4882a593Smuzhiyun "USB Power Delivery Specification Revision 2.0, Version 1.3" chapter 6.4.4.3.1 Discover 145*4882a593Smuzhiyun Identity. User can specify the VDO array via VDO_IDH/_CERT/_PRODUCT/_CABLE/_AMA defined in 146*4882a593Smuzhiyun dt-bindings/usb/pd.h. 147*4882a593Smuzhiyun minItems: 3 148*4882a593Smuzhiyun maxItems: 6 149*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32-array 150*4882a593Smuzhiyun 151*4882a593Smuzhiyun op-sink-microwatt: 152*4882a593Smuzhiyun description: Sink required operating power in microwatt, if source can't 153*4882a593Smuzhiyun offer the power, Capability Mismatch is set. Required for power sink and 154*4882a593Smuzhiyun power dual role. 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun ports: 157*4882a593Smuzhiyun description: OF graph bindings (specified in bindings/graph.txt) that model 158*4882a593Smuzhiyun any data bus to the connector unless the bus is between parent node and 159*4882a593Smuzhiyun the connector. Since a single connector can have multiple data buses every 160*4882a593Smuzhiyun bus has an assigned OF graph port number as described below. 161*4882a593Smuzhiyun type: object 162*4882a593Smuzhiyun properties: 163*4882a593Smuzhiyun port@0: 164*4882a593Smuzhiyun type: object 165*4882a593Smuzhiyun description: High Speed (HS), present in all connectors. 166*4882a593Smuzhiyun 167*4882a593Smuzhiyun port@1: 168*4882a593Smuzhiyun type: object 169*4882a593Smuzhiyun description: Super Speed (SS), present in SS capable connectors. 170*4882a593Smuzhiyun 171*4882a593Smuzhiyun port@2: 172*4882a593Smuzhiyun type: object 173*4882a593Smuzhiyun description: Sideband Use (SBU), present in USB-C. This describes the 174*4882a593Smuzhiyun alternate mode connection of which SBU is a part. 175*4882a593Smuzhiyun 176*4882a593Smuzhiyun required: 177*4882a593Smuzhiyun - port@0 178*4882a593Smuzhiyun 179*4882a593Smuzhiyun new-source-frs-typec-current: 180*4882a593Smuzhiyun description: Initial current capability of the new source when vSafe5V 181*4882a593Smuzhiyun is applied during PD3.0 Fast Role Swap. "Table 6-14 Fixed Supply PDO - Sink" 182*4882a593Smuzhiyun of "USB Power Delivery Specification Revision 3.0, Version 1.2" provides the 183*4882a593Smuzhiyun different power levels and "6.4.1.3.1.6 Fast Role Swap USB Type-C Current" 184*4882a593Smuzhiyun provides a detailed description of the field. The sink PDO from current source 185*4882a593Smuzhiyun reflects the current source's(i.e. transmitter of the FRS signal) power 186*4882a593Smuzhiyun requirement during fr swap. The current sink (i.e. receiver of the FRS signal), 187*4882a593Smuzhiyun a.k.a new source, should check if it will be able to satisfy the current source's, 188*4882a593Smuzhiyun new sink's, requirement during frswap before enabling the frs signal reception. 189*4882a593Smuzhiyun This property refers to maximum current capability that the current sink can 190*4882a593Smuzhiyun satisfy. During FRS, VBUS voltage is at 5V, as the partners are in implicit 191*4882a593Smuzhiyun contract, hence, the power level is only a function of the current capability. 192*4882a593Smuzhiyun "1" refers to default USB power level as described by "Table 6-14 Fixed Supply PDO - Sink". 193*4882a593Smuzhiyun "2" refers to 1.5A@5V. 194*4882a593Smuzhiyun "3" refers to 3.0A@5V. 195*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 196*4882a593Smuzhiyun enum: [1, 2, 3] 197*4882a593Smuzhiyun 198*4882a593Smuzhiyun slow-charger-loop: 199*4882a593Smuzhiyun description: Allows PMIC charger loops which are slow(i.e. cannot meet the 15ms deadline) to 200*4882a593Smuzhiyun still comply to pSnkStby i.e Maximum power that can be consumed by sink while in Sink Standby 201*4882a593Smuzhiyun state as defined in 7.4.2 Sink Electrical Parameters of USB Power Delivery Specification 202*4882a593Smuzhiyun Revision 3.0, Version 1.2. When the property is set, the port requests pSnkStby(2.5W - 203*4882a593Smuzhiyun 5V@500mA) upon entering SNK_DISCOVERY(instead of 3A or the 1.5A, Rp current advertised, during 204*4882a593Smuzhiyun SNK_DISCOVERY) and the actual currrent limit after reception of PS_Ready for PD link or during 205*4882a593Smuzhiyun SNK_READY for non-pd link. 206*4882a593Smuzhiyun type: boolean 207*4882a593Smuzhiyun 208*4882a593Smuzhiyundependencies: 209*4882a593Smuzhiyun sink-vdos-v1: [ 'sink-vdos' ] 210*4882a593Smuzhiyun sink-vdos: [ 'sink-vdos-v1' ] 211*4882a593Smuzhiyun 212*4882a593Smuzhiyunrequired: 213*4882a593Smuzhiyun - compatible 214*4882a593Smuzhiyun 215*4882a593SmuzhiyunallOf: 216*4882a593Smuzhiyun - if: 217*4882a593Smuzhiyun properties: 218*4882a593Smuzhiyun compatible: 219*4882a593Smuzhiyun contains: 220*4882a593Smuzhiyun const: gpio-usb-b-connector 221*4882a593Smuzhiyun then: 222*4882a593Smuzhiyun anyOf: 223*4882a593Smuzhiyun - required: 224*4882a593Smuzhiyun - vbus-gpios 225*4882a593Smuzhiyun - required: 226*4882a593Smuzhiyun - id-gpios 227*4882a593Smuzhiyun 228*4882a593Smuzhiyun - if: 229*4882a593Smuzhiyun properties: 230*4882a593Smuzhiyun compatible: 231*4882a593Smuzhiyun contains: 232*4882a593Smuzhiyun const: samsung,usb-connector-11pin 233*4882a593Smuzhiyun then: 234*4882a593Smuzhiyun properties: 235*4882a593Smuzhiyun type: 236*4882a593Smuzhiyun const: micro 237*4882a593Smuzhiyun 238*4882a593SmuzhiyunadditionalProperties: true 239*4882a593Smuzhiyun 240*4882a593Smuzhiyunexamples: 241*4882a593Smuzhiyun # Micro-USB connector with HS lines routed via controller (MUIC). 242*4882a593Smuzhiyun - | 243*4882a593Smuzhiyun muic-max77843 { 244*4882a593Smuzhiyun usb_con1: connector { 245*4882a593Smuzhiyun compatible = "usb-b-connector"; 246*4882a593Smuzhiyun label = "micro-USB"; 247*4882a593Smuzhiyun type = "micro"; 248*4882a593Smuzhiyun }; 249*4882a593Smuzhiyun }; 250*4882a593Smuzhiyun 251*4882a593Smuzhiyun # USB-C connector attached to CC controller (s2mm005), HS lines routed 252*4882a593Smuzhiyun # to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort. 253*4882a593Smuzhiyun # DisplayPort video lines are routed to the connector via SS mux in USB3 PHY. 254*4882a593Smuzhiyun - | 255*4882a593Smuzhiyun ccic: s2mm005 { 256*4882a593Smuzhiyun usb_con2: connector { 257*4882a593Smuzhiyun compatible = "usb-c-connector"; 258*4882a593Smuzhiyun label = "USB-C"; 259*4882a593Smuzhiyun 260*4882a593Smuzhiyun ports { 261*4882a593Smuzhiyun #address-cells = <1>; 262*4882a593Smuzhiyun #size-cells = <0>; 263*4882a593Smuzhiyun 264*4882a593Smuzhiyun port@0 { 265*4882a593Smuzhiyun reg = <0>; 266*4882a593Smuzhiyun usb_con_hs: endpoint { 267*4882a593Smuzhiyun remote-endpoint = <&max77865_usbc_hs>; 268*4882a593Smuzhiyun }; 269*4882a593Smuzhiyun }; 270*4882a593Smuzhiyun port@1 { 271*4882a593Smuzhiyun reg = <1>; 272*4882a593Smuzhiyun usb_con_ss: endpoint { 273*4882a593Smuzhiyun remote-endpoint = <&usbdrd_phy_ss>; 274*4882a593Smuzhiyun }; 275*4882a593Smuzhiyun }; 276*4882a593Smuzhiyun port@2 { 277*4882a593Smuzhiyun reg = <2>; 278*4882a593Smuzhiyun usb_con_sbu: endpoint { 279*4882a593Smuzhiyun remote-endpoint = <&dp_aux>; 280*4882a593Smuzhiyun }; 281*4882a593Smuzhiyun }; 282*4882a593Smuzhiyun }; 283*4882a593Smuzhiyun }; 284*4882a593Smuzhiyun }; 285*4882a593Smuzhiyun 286*4882a593Smuzhiyun # USB-C connector attached to a typec port controller(ptn5110), which has 287*4882a593Smuzhiyun # power delivery support and enables drp. 288*4882a593Smuzhiyun - | 289*4882a593Smuzhiyun #include <dt-bindings/usb/pd.h> 290*4882a593Smuzhiyun typec: ptn5110 { 291*4882a593Smuzhiyun usb_con3: connector { 292*4882a593Smuzhiyun compatible = "usb-c-connector"; 293*4882a593Smuzhiyun label = "USB-C"; 294*4882a593Smuzhiyun power-role = "dual"; 295*4882a593Smuzhiyun try-power-role = "sink"; 296*4882a593Smuzhiyun source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>; 297*4882a593Smuzhiyun sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM) 298*4882a593Smuzhiyun PDO_VAR(5000, 12000, 2000)>; 299*4882a593Smuzhiyun op-sink-microwatt = <10000000>; 300*4882a593Smuzhiyun }; 301*4882a593Smuzhiyun }; 302*4882a593Smuzhiyun 303*4882a593Smuzhiyun # USB-C connector attached to SoC and USB3 typec port controller(hd3ss3220) 304*4882a593Smuzhiyun # with SS 2:1 MUX. HS lines routed to SoC, SS lines routed to the MUX and 305*4882a593Smuzhiyun # the output of MUX is connected to the SoC. 306*4882a593Smuzhiyun - | 307*4882a593Smuzhiyun connector { 308*4882a593Smuzhiyun compatible = "usb-c-connector"; 309*4882a593Smuzhiyun label = "USB-C"; 310*4882a593Smuzhiyun data-role = "dual"; 311*4882a593Smuzhiyun 312*4882a593Smuzhiyun ports { 313*4882a593Smuzhiyun #address-cells = <1>; 314*4882a593Smuzhiyun #size-cells = <0>; 315*4882a593Smuzhiyun port@0 { 316*4882a593Smuzhiyun reg = <0>; 317*4882a593Smuzhiyun hs_ep: endpoint { 318*4882a593Smuzhiyun remote-endpoint = <&usb3_hs_ep>; 319*4882a593Smuzhiyun }; 320*4882a593Smuzhiyun }; 321*4882a593Smuzhiyun port@1 { 322*4882a593Smuzhiyun reg = <1>; 323*4882a593Smuzhiyun ss_ep: endpoint { 324*4882a593Smuzhiyun remote-endpoint = <&hd3ss3220_in_ep>; 325*4882a593Smuzhiyun }; 326*4882a593Smuzhiyun }; 327*4882a593Smuzhiyun }; 328*4882a593Smuzhiyun }; 329*4882a593Smuzhiyun 330*4882a593Smuzhiyun # USB connector with GPIO control lines 331*4882a593Smuzhiyun - | 332*4882a593Smuzhiyun #include <dt-bindings/gpio/gpio.h> 333*4882a593Smuzhiyun 334*4882a593Smuzhiyun usb { 335*4882a593Smuzhiyun connector { 336*4882a593Smuzhiyun compatible = "gpio-usb-b-connector", "usb-b-connector"; 337*4882a593Smuzhiyun type = "micro"; 338*4882a593Smuzhiyun id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>; 339*4882a593Smuzhiyun vbus-supply = <&usb_p0_vbus>; 340*4882a593Smuzhiyun }; 341*4882a593Smuzhiyun }; 342*4882a593Smuzhiyun 343*4882a593Smuzhiyun # Micro-USB connector with HS lines routed via controller (MUIC) and MHL 344*4882a593Smuzhiyun # lines connected to HDMI-MHL bridge (sii8620) on Samsung Exynos5433-based 345*4882a593Smuzhiyun # mobile phone 346*4882a593Smuzhiyun - | 347*4882a593Smuzhiyun muic-max77843 { 348*4882a593Smuzhiyun usb_con4: connector { 349*4882a593Smuzhiyun compatible = "samsung,usb-connector-11pin", "usb-b-connector"; 350*4882a593Smuzhiyun label = "micro-USB"; 351*4882a593Smuzhiyun type = "micro"; 352*4882a593Smuzhiyun 353*4882a593Smuzhiyun ports { 354*4882a593Smuzhiyun #address-cells = <1>; 355*4882a593Smuzhiyun #size-cells = <0>; 356*4882a593Smuzhiyun 357*4882a593Smuzhiyun port@0 { 358*4882a593Smuzhiyun reg = <0>; 359*4882a593Smuzhiyun muic_to_usb: endpoint { 360*4882a593Smuzhiyun remote-endpoint = <&usb_to_muic>; 361*4882a593Smuzhiyun }; 362*4882a593Smuzhiyun }; 363*4882a593Smuzhiyun port@3 { 364*4882a593Smuzhiyun reg = <3>; 365*4882a593Smuzhiyun usb_con_mhl: endpoint { 366*4882a593Smuzhiyun remote-endpoint = <&sii8620_mhl>; 367*4882a593Smuzhiyun }; 368*4882a593Smuzhiyun }; 369*4882a593Smuzhiyun }; 370*4882a593Smuzhiyun }; 371*4882a593Smuzhiyun }; 372