0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/usb/snps,dwc3.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Synopsys DesignWare USB3 Controller
0008
0009 maintainers:
0010 - Felipe Balbi <balbi@kernel.org>
0011
0012 description:
0013 This is usually a subnode to DWC3 glue to which it is connected, but can also
0014 be presented as a standalone DT node with an optional vendor-specific
0015 compatible string.
0016
0017 allOf:
0018 - $ref: usb-drd.yaml#
0019 - if:
0020 properties:
0021 dr_mode:
0022 const: peripheral
0023
0024 required:
0025 - dr_mode
0026 then:
0027 $ref: usb.yaml#
0028 else:
0029 $ref: usb-xhci.yaml#
0030
0031 properties:
0032 compatible:
0033 contains:
0034 oneOf:
0035 - const: snps,dwc3
0036 - const: synopsys,dwc3
0037 deprecated: true
0038
0039 reg:
0040 maxItems: 1
0041
0042 interrupts:
0043 description:
0044 It's either a single common DWC3 interrupt (dwc_usb3) or individual
0045 interrupts for the host, gadget and DRD modes.
0046 minItems: 1
0047 maxItems: 3
0048
0049 interrupt-names:
0050 minItems: 1
0051 maxItems: 3
0052 oneOf:
0053 - const: dwc_usb3
0054 - items:
0055 enum: [host, peripheral, otg]
0056
0057 clocks:
0058 description:
0059 In general the core supports three types of clocks. bus_early is a
0060 SoC Bus Clock (AHB/AXI/Native). ref generates ITP when the UTMI/ULPI
0061 PHY is suspended. suspend clocks a small part of the USB3 core when
0062 SS PHY in P3. But particular cases may differ from that having less
0063 or more clock sources with another names.
0064
0065 clock-names:
0066 contains:
0067 anyOf:
0068 - enum: [bus_early, ref, suspend]
0069 - true
0070
0071 dma-coherent: true
0072
0073 iommus:
0074 maxItems: 1
0075
0076 usb-phy:
0077 minItems: 1
0078 items:
0079 - description: USB2/HS PHY
0080 - description: USB3/SS PHY
0081
0082 phys:
0083 minItems: 1
0084 maxItems: 2
0085
0086 phy-names:
0087 minItems: 1
0088 maxItems: 2
0089 items:
0090 enum:
0091 - usb2-phy
0092 - usb3-phy
0093
0094 resets:
0095 minItems: 1
0096
0097 snps,usb2-lpm-disable:
0098 description: Indicate if we don't want to enable USB2 HW LPM for host
0099 mode.
0100 type: boolean
0101
0102 snps,usb3_lpm_capable:
0103 description: Determines if platform is USB3 LPM capable
0104 type: boolean
0105
0106 snps,usb2-gadget-lpm-disable:
0107 description: Indicate if we don't want to enable USB2 HW LPM for gadget
0108 mode.
0109 type: boolean
0110
0111 snps,dis-start-transfer-quirk:
0112 description:
0113 When set, disable isoc START TRANSFER command failure SW work-around
0114 for DWC_usb31 version 1.70a-ea06 and prior.
0115 type: boolean
0116
0117 snps,disable_scramble_quirk:
0118 description:
0119 True when SW should disable data scrambling. Only really useful for FPGA
0120 builds.
0121 type: boolean
0122
0123 snps,has-lpm-erratum:
0124 description: True when DWC3 was configured with LPM Erratum enabled
0125 type: boolean
0126
0127 snps,lpm-nyet-threshold:
0128 description: LPM NYET threshold
0129 $ref: /schemas/types.yaml#/definitions/uint8
0130
0131 snps,u2exit_lfps_quirk:
0132 description: Set if we want to enable u2exit lfps quirk
0133 type: boolean
0134
0135 snps,u2ss_inp3_quirk:
0136 description: Set if we enable P3 OK for U2/SS Inactive quirk
0137 type: boolean
0138
0139 snps,req_p1p2p3_quirk:
0140 description:
0141 When set, the core will always request for P1/P2/P3 transition sequence.
0142 type: boolean
0143
0144 snps,del_p1p2p3_quirk:
0145 description:
0146 When set core will delay P1/P2/P3 until a certain amount of 8B10B errors
0147 occur.
0148 type: boolean
0149
0150 snps,del_phy_power_chg_quirk:
0151 description: When set core will delay PHY power change from P0 to P1/P2/P3.
0152 type: boolean
0153
0154 snps,lfps_filter_quirk:
0155 description: When set core will filter LFPS reception.
0156 type: boolean
0157
0158 snps,rx_detect_poll_quirk:
0159 description:
0160 when set core will disable a 400us delay to start Polling LFPS after
0161 RX.Detect.
0162 type: boolean
0163
0164 snps,tx_de_emphasis_quirk:
0165 description: When set core will set Tx de-emphasis value
0166 type: boolean
0167
0168 snps,tx_de_emphasis:
0169 description:
0170 The value driven to the PHY is controlled by the LTSSM during USB3
0171 Compliance mode.
0172 $ref: /schemas/types.yaml#/definitions/uint8
0173 enum:
0174 - 0 # -6dB de-emphasis
0175 - 1 # -3.5dB de-emphasis
0176 - 2 # No de-emphasis
0177
0178 snps,dis_u3_susphy_quirk:
0179 description: When set core will disable USB3 suspend phy
0180 type: boolean
0181
0182 snps,dis_u2_susphy_quirk:
0183 description: When set core will disable USB2 suspend phy
0184 type: boolean
0185
0186 snps,dis_enblslpm_quirk:
0187 description:
0188 When set clears the enblslpm in GUSB2PHYCFG, disabling the suspend signal
0189 to the PHY.
0190 type: boolean
0191
0192 snps,dis-u1-entry-quirk:
0193 description: Set if link entering into U1 needs to be disabled
0194 type: boolean
0195
0196 snps,dis-u2-entry-quirk:
0197 description: Set if link entering into U2 needs to be disabled
0198 type: boolean
0199
0200 snps,dis_rxdet_inp3_quirk:
0201 description:
0202 When set core will disable receiver detection in PHY P3 power state.
0203 type: boolean
0204
0205 snps,dis-u2-freeclk-exists-quirk:
0206 description:
0207 When set, clear the u2_freeclk_exists in GUSB2PHYCFG, specify that USB2
0208 PHY doesn't provide a free-running PHY clock.
0209 type: boolean
0210
0211 snps,dis-del-phy-power-chg-quirk:
0212 description:
0213 When set core will change PHY power from P0 to P1/P2/P3 without delay.
0214 type: boolean
0215
0216 snps,dis-tx-ipgap-linecheck-quirk:
0217 description: When set, disable u2mac linestate check during HS transmit
0218 type: boolean
0219
0220 snps,parkmode-disable-ss-quirk:
0221 description:
0222 When set, all SuperSpeed bus instances in park mode are disabled.
0223 type: boolean
0224
0225 snps,dis_metastability_quirk:
0226 description:
0227 When set, disable metastability workaround. CAUTION! Use only if you are
0228 absolutely sure of it.
0229 type: boolean
0230
0231 snps,dis-split-quirk:
0232 description:
0233 When set, change the way URBs are handled by the driver. Needed to
0234 avoid -EPROTO errors with usbhid on some devices (Hikey 970).
0235 type: boolean
0236
0237 snps,is-utmi-l1-suspend:
0238 description:
0239 True when DWC3 asserts output signal utmi_l1_suspend_n, false when
0240 asserts utmi_sleep_n.
0241 type: boolean
0242
0243 snps,hird-threshold:
0244 description: HIRD threshold
0245 $ref: /schemas/types.yaml#/definitions/uint8
0246
0247 snps,hsphy_interface:
0248 description:
0249 High-Speed PHY interface selection between UTMI+ and ULPI when the
0250 DWC_USB3_HSPHY_INTERFACE has value 3.
0251 $ref: /schemas/types.yaml#/definitions/uint8
0252 enum: [utmi, ulpi]
0253
0254 snps,quirk-frame-length-adjustment:
0255 description:
0256 Value for GFLADJ_30MHZ field of GFLADJ register for post-silicon frame
0257 length adjustment when the fladj_30mhz_sdbnd signal is invalid or
0258 incorrect.
0259 $ref: /schemas/types.yaml#/definitions/uint32
0260 minimum: 0
0261 maximum: 0x3f
0262
0263 snps,ref-clock-period-ns:
0264 description:
0265 Value for REFCLKPER field of GUCTL register for reference clock period in
0266 nanoseconds, when the hardware set default does not match the actual
0267 clock.
0268
0269 This binding is deprecated. Instead, provide an appropriate reference clock.
0270 minimum: 8
0271 maximum: 62
0272 deprecated: true
0273
0274 snps,rx-thr-num-pkt-prd:
0275 description:
0276 Periodic ESS RX packet threshold count (host mode only). Set this and
0277 snps,rx-max-burst-prd to a valid, non-zero value 1-16 (DWC_usb31
0278 programming guide section 1.2.4) to enable periodic ESS RX threshold.
0279 $ref: /schemas/types.yaml#/definitions/uint8
0280 minimum: 1
0281 maximum: 16
0282
0283 snps,rx-max-burst-prd:
0284 description:
0285 Max periodic ESS RX burst size (host mode only). Set this and
0286 snps,rx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31
0287 programming guide section 1.2.4) to enable periodic ESS RX threshold.
0288 $ref: /schemas/types.yaml#/definitions/uint8
0289 minimum: 1
0290 maximum: 16
0291
0292 snps,tx-thr-num-pkt-prd:
0293 description:
0294 Periodic ESS TX packet threshold count (host mode only). Set this and
0295 snps,tx-max-burst-prd to a valid, non-zero value 1-16 (DWC_usb31
0296 programming guide section 1.2.3) to enable periodic ESS TX threshold.
0297 $ref: /schemas/types.yaml#/definitions/uint8
0298 minimum: 1
0299 maximum: 16
0300
0301 snps,tx-max-burst-prd:
0302 description:
0303 Max periodic ESS TX burst size (host mode only). Set this and
0304 snps,tx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31
0305 programming guide section 1.2.3) to enable periodic ESS TX threshold.
0306 $ref: /schemas/types.yaml#/definitions/uint8
0307 minimum: 1
0308 maximum: 16
0309
0310 tx-fifo-resize:
0311 description: Determines if the TX fifos can be dynamically resized depending
0312 on the number of IN endpoints used and if bursting is supported. This
0313 may help improve bandwidth on platforms with higher system latencies, as
0314 increased fifo space allows for the controller to prefetch data into its
0315 internal memory.
0316 type: boolean
0317
0318 tx-fifo-max-num:
0319 description: Specifies the max number of packets the txfifo resizing logic
0320 can account for when higher endpoint bursting is used. (bMaxBurst > 6) The
0321 higher the number, the more fifo space the txfifo resizing logic will
0322 allocate for that endpoint.
0323 $ref: /schemas/types.yaml#/definitions/uint8
0324 minimum: 3
0325
0326 snps,incr-burst-type-adjustment:
0327 description:
0328 Value for INCR burst type of GSBUSCFG0 register, undefined length INCR
0329 burst type enable and INCRx type. A single value means INCRX burst mode
0330 enabled. If more than one value specified, undefined length INCR burst
0331 type will be enabled with burst lengths utilized up to the maximum
0332 of the values passed in this property.
0333 $ref: /schemas/types.yaml#/definitions/uint32-array
0334 minItems: 1
0335 maxItems: 8
0336 uniqueItems: true
0337 items:
0338 enum: [1, 4, 8, 16, 32, 64, 128, 256]
0339
0340 port:
0341 $ref: /schemas/graph.yaml#/properties/port
0342 description:
0343 This port is used with the 'usb-role-switch' property to connect the
0344 dwc3 to type C connector.
0345
0346 wakeup-source:
0347 $ref: /schemas/types.yaml#/definitions/flag
0348 description:
0349 Enable USB remote wakeup.
0350
0351 unevaluatedProperties: false
0352
0353 required:
0354 - compatible
0355 - reg
0356 - interrupts
0357
0358 examples:
0359 - |
0360 usb@4a030000 {
0361 compatible = "snps,dwc3";
0362 reg = <0x4a030000 0xcfff>;
0363 interrupts = <0 92 4>;
0364 usb-phy = <&usb2_phy>, <&usb3_phy>;
0365 snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
0366 };
0367 - |
0368 usb@4a000000 {
0369 compatible = "snps,dwc3";
0370 reg = <0x4a000000 0xcfff>;
0371 interrupts = <0 92 4>;
0372 clocks = <&clk 1>, <&clk 2>, <&clk 3>;
0373 clock-names = "bus_early", "ref", "suspend";
0374 phys = <&usb2_phy>, <&usb3_phy>;
0375 phy-names = "usb2-phy", "usb3-phy";
0376 snps,dis_u2_susphy_quirk;
0377 snps,dis_enblslpm_quirk;
0378 };
0379 ...