FILE
qcom,pmic-typec.yaml
File preview with syntax highlighting.
linux-6.19.14/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/usb/qcom,pmic-typec.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm PMIC based USB Type-C block 8 9maintainers: 10 - Bryan O'Donoghue <bryan.odonoghue@linaro.org> 11 12description: 13 Qualcomm PMIC Type-C block 14 15properties: 16 compatible: 17 oneOf: 18 - enum: 19 - qcom,pmi632-typec 20 - qcom,pm8150b-typec 21 - items: 22 - enum: 23 - qcom,pm6150-typec 24 - qcom,pm7250b-typec 25 - const: qcom,pm8150b-typec 26 - items: 27 - enum: 28 - qcom,pm4125-typec 29 - const: qcom,pmi632-typec 30 31 connector: 32 type: object 33 $ref: /schemas/connector/usb-connector.yaml# 34 unevaluatedProperties: false 35 36 reg: 37 description: Type-C port and pdphy SPMI register base offsets 38 minItems: 1 39 maxItems: 2 40 41 interrupts: 42 minItems: 8 43 items: 44 - description: Type-C CC attach notification, VBUS error, tCCDebounce done 45 - description: Type-C VCONN powered 46 - description: Type-C CC state change 47 - description: Type-C VCONN over-current 48 - description: Type-C VBUS state change 49 - description: Type-C Attach/detach notification 50 - description: Type-C Legacy cable detect 51 - description: Type-C Try.Src Try.Snk state change 52 - description: Power Domain Signal TX - HardReset or CableReset signal TX 53 - description: Power Domain Signal RX - HardReset or CableReset signal RX 54 - description: Power Domain TX complete 55 - description: Power Domain RX complete 56 - description: Power Domain TX fail 57 - description: Power Domain TX message discard 58 - description: Power Domain RX message discard 59 - description: Power Domain Fast Role Swap event 60 61 interrupt-names: 62 minItems: 8 63 items: 64 - const: or-rid-detect-change 65 - const: vpd-detect 66 - const: cc-state-change 67 - const: vconn-oc 68 - const: vbus-change 69 - const: attach-detach 70 - const: legacy-cable-detect 71 - const: try-snk-src-detect 72 - const: sig-tx 73 - const: sig-rx 74 - const: msg-tx 75 - const: msg-rx 76 - const: msg-tx-failed 77 - const: msg-tx-discarded 78 - const: msg-rx-discarded 79 - const: fr-swap 80 81 vdd-vbus-supply: 82 description: VBUS power supply. 83 84 vdd-pdphy-supply: 85 description: VDD regulator supply to the PDPHY. 86 87 port: 88 $ref: /schemas/graph.yaml#/properties/port 89 description: 90 Contains a port which produces data-role switching messages. 91 92required: 93 - compatible 94 - reg 95 - interrupts 96 - interrupt-names 97 - vdd-vbus-supply 98 99allOf: 100 - if: 101 properties: 102 compatible: 103 contains: 104 enum: 105 - qcom,pmi632-typec 106 then: 107 properties: 108 reg: 109 maxItems: 1 110 interrupts: 111 maxItems: 8 112 interrupt-names: 113 maxItems: 8 114 vdd-pdphy-supply: false 115 else: 116 properties: 117 reg: 118 maxItems: 2 119 interrupts: 120 minItems: 16 121 interrupt-names: 122 maxItems: 16 123 required: 124 - vdd-pdphy-supply 125 126additionalProperties: false 127 128examples: 129 - | 130 #include <dt-bindings/interrupt-controller/arm-gic.h> 131 #include <dt-bindings/usb/pd.h> 132 133 pmic { 134 #address-cells = <1>; 135 #size-cells = <0>; 136 137 pm8150b_typec: typec@1500 { 138 compatible = "qcom,pm8150b-typec"; 139 reg = <0x1500>, 140 <0x1700>; 141 142 interrupts = <0x2 0x15 0x00 IRQ_TYPE_EDGE_RISING>, 143 <0x2 0x15 0x01 IRQ_TYPE_EDGE_BOTH>, 144 <0x2 0x15 0x02 IRQ_TYPE_EDGE_RISING>, 145 <0x2 0x15 0x03 IRQ_TYPE_EDGE_BOTH>, 146 <0x2 0x15 0x04 IRQ_TYPE_EDGE_RISING>, 147 <0x2 0x15 0x05 IRQ_TYPE_EDGE_RISING>, 148 <0x2 0x15 0x06 IRQ_TYPE_EDGE_BOTH>, 149 <0x2 0x15 0x07 IRQ_TYPE_EDGE_RISING>, 150 <0x2 0x17 0x00 IRQ_TYPE_EDGE_RISING>, 151 <0x2 0x17 0x01 IRQ_TYPE_EDGE_RISING>, 152 <0x2 0x17 0x02 IRQ_TYPE_EDGE_RISING>, 153 <0x2 0x17 0x03 IRQ_TYPE_EDGE_RISING>, 154 <0x2 0x17 0x04 IRQ_TYPE_EDGE_RISING>, 155 <0x2 0x17 0x05 IRQ_TYPE_EDGE_RISING>, 156 <0x2 0x17 0x06 IRQ_TYPE_EDGE_RISING>, 157 <0x2 0x17 0x07 IRQ_TYPE_EDGE_RISING>; 158 159 interrupt-names = "or-rid-detect-change", 160 "vpd-detect", 161 "cc-state-change", 162 "vconn-oc", 163 "vbus-change", 164 "attach-detach", 165 "legacy-cable-detect", 166 "try-snk-src-detect", 167 "sig-tx", 168 "sig-rx", 169 "msg-tx", 170 "msg-rx", 171 "msg-tx-failed", 172 "msg-tx-discarded", 173 "msg-rx-discarded", 174 "fr-swap"; 175 176 vdd-vbus-supply = <&pm8150b_vbus>; 177 vdd-pdphy-supply = <&vreg_l2a_3p1>; 178 179 connector { 180 compatible = "usb-c-connector"; 181 182 power-role = "source"; 183 data-role = "dual"; 184 self-powered; 185 186 source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_DUAL_ROLE | 187 PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>; 188 189 ports { 190 #address-cells = <1>; 191 #size-cells = <0>; 192 193 port@0 { 194 reg = <0>; 195 pmic_typec_hs_in: endpoint { 196 remote-endpoint = <&usb_hs_out>; 197 }; 198 }; 199 200 port@1 { 201 reg = <1>; 202 pmic_typec_ss_in: endpoint { 203 remote-endpoint = <&usb_phy_typec_ss_out>; 204 }; 205 }; 206 207 port@2 { 208 reg = <2>; 209 pmic_typec_sbu: endpoint { 210 remote-endpoint = <&usb_mux_sbu>; 211 }; 212 }; 213 }; 214 }; 215 }; 216 }; 217 218 usb { 219 dr_mode = "otg"; 220 usb-role-switch; 221 port { 222 usb_hs_out: endpoint { 223 remote-endpoint = <&pmic_typec_hs_in>; 224 }; 225 }; 226 }; 227 228 usb-phy { 229 orientation-switch; 230 port { 231 usb_phy_typec_ss_out: endpoint { 232 remote-endpoint = <&pmic_typec_ss_in>; 233 }; 234 }; 235 }; 236 237 usb-mux { 238 orientation-switch; 239 mode-switch; 240 241 port { 242 usb_mux_sbu: endpoint { 243 remote-endpoint = <&pmic_typec_sbu>; 244 }; 245 }; 246 }; 247 248...
~/
Read-only file preview.