1# Copyright 2022 The Chromium OS Authors 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 A USB Type-C connector node represents a physical USB Type-C connector. 6 It should be a child of a USB-C interface controller or a separate node 7 when it is attached to both MUX and USB-C interface controller. 8 9 This is based on Linux, documentation: 10 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/connector/usb-connector.yaml?h=v5.19&id=3d7cb6b04c3f3115719235cc6866b10326de34cd 11 12 Example: 13 14 USB-C connector attached to a STM32 UCPD typec port controller, which has 15 power delivery support and enables SINK. 16 17 vbus1: vbus { 18 compatible = "zephyr,usb-c-vbus-adc"; 19 io-channels = <&adc2 8>; 20 output-ohms = <49900>; 21 full-ohms = <(330000 + 49900)>; 22 }; 23 24 ports { 25 #address-cells = <1>; 26 #size-cells = <0>; 27 port1: usb-c-port@1 { 28 compatible = "usb-c-connector"; 29 reg = <1>; 30 tcpc = <&ucpd1>; 31 vbus = <&vbus1>; 32 power-role = "SINK"; 33 sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM) 34 PDO_VAR(5000, 12000, 2000)>; 35 op-sink-microwatt = <10000000>; 36 }; 37 }; 38 39 40compatible: "usb-c-connector" 41 42include: base.yaml 43 44properties: 45 tcpc: 46 type: phandle 47 required: true 48 description: | 49 Type-C Port Controller for this port. 50 51 vbus: 52 type: phandle 53 required: true 54 description: | 55 VBUS measurement and control for this port. 56 57 power-role: 58 type: string 59 required: true 60 enum: 61 - "sink" 62 - "source" 63 - "dual" 64 description: | 65 The Port power role. "dual" for Dual Role Port. 66 67 try-power-role: 68 type: string 69 enum: 70 - "sink" 71 - "source" 72 - "dual" 73 description: | 74 Preferred power role. 75 76 data-role: 77 type: string 78 enum: 79 - "host" 80 - "device" 81 - "dual" 82 description: | 83 The Port data role. 84 * "host" for Downstream Facing Port (DFP) 85 * "device" for Upstream Facing Port (UFP) 86 * "dual" for Dual Role Data 87 88 typec-power-opmode: 89 type: string 90 enum: 91 - "default" 92 - "1.5A" 93 - "3.0A" 94 description: | 95 Initial Type C advertised power, determined by the Rp when 96 operating as a Source. 97 * "default" corresponds to default USB voltage and current 98 defined by the USB 2.0 and USB 3.2 specifications. 99 * 5V@500mA for USB 2.0 100 * 5V@900mA for USB 3.2 single-lane 101 * 5V@1500mA for USB 3.2 dual-lane 102 * "1.5A" and "3.0A", 5V@1.5A and 5V@3.0A. 103 104 pd-disable: 105 type: boolean 106 description: | 107 Disables power delivery when true 108 109 source-pdos: 110 type: array 111 description: | 112 An array of source Power Data Objects (PDOs). 113 Use tht following macros to define the PDOs, defined in 114 dt-bindings/usb-c/pd.h. 115 * PDO_FIXED 116 * PDO_BATT 117 * PDO_VAR 118 * PDO_PPS_APDO 119 Valid range: 1 - 7 120 121 sink-pdos: 122 type: array 123 description: | 124 An array of sink Power Data Objects (PDOs). 125 Use tht following macros to define the PDOs, defined in 126 dt-bindings/usb-c/pd.h. 127 * PDO_FIXED 128 * PDO_BATT 129 * PDO_VAR 130 * PDO_PPS_APDO 131 Valid range: 1 - 7 132 133 sink-vdos: 134 type: array 135 description: | 136 An array of sink Vendor Defined Objects (VDOs). 137 Use tht following macros to define the VDOs, defined in 138 dt-bindings/usb-c/pd.h. 139 * VDO_IDH 140 * VDO_CERT 141 * VDO_PRODUCT 142 * VDO_UFP 143 * VDO_DFP 144 * VDO_PCABLE 145 * VDO_ACABLE 146 * VDO_VPD 147 Valid range: 3 - 6 148 149 sink-vdos-v1: 150 type: array 151 description: | 152 An array of sink Vendor Defined Objects (VDOs). 153 Use tht following macros to define the VDOs, defined in 154 dt-bindings/usb-c/pd.h. 155 * VDO_IDH 156 * VDO_CERT 157 * VDO_PRODUCT 158 * VDO_CABLE 159 * VDO_AMA 160 Valid range: 3 - 6 161 162 op-sink-microwatt: 163 type: int 164 description: | 165 Minimum power, in microwatts, needed by the sink. A Capability 166 Mismatch is sent to the Source if the power can't be met. 167