brintos

brintos / linux-shallow public Read only

0
0
Text · 14.7 KiB · 1cd0ca9 Raw
496 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/usb/snps,dwc3.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Synopsys DesignWare USB3 Controller8 9maintainers:10  - Felipe Balbi <balbi@kernel.org>11 12description:13  This is usually a subnode to DWC3 glue to which it is connected, but can also14  be presented as a standalone DT node with an optional vendor-specific15  compatible string.16 17allOf:18  - $ref: usb-drd.yaml#19  - if:20      properties:21        dr_mode:22          const: peripheral23 24      required:25        - dr_mode26    then:27      $ref: usb.yaml#28    else:29      $ref: usb-xhci.yaml#30 31properties:32  compatible:33    contains:34      oneOf:35        - const: snps,dwc336        - const: synopsys,dwc337          deprecated: true38 39  reg:40    maxItems: 141 42  interrupts:43    description:44      It's either a single common DWC3 interrupt (dwc_usb3) or individual45      interrupts for the host, gadget and DRD modes.46    minItems: 147    maxItems: 448 49  interrupt-names:50    minItems: 151    maxItems: 452    oneOf:53      - const: dwc_usb354      - items:55          enum: [host, peripheral, otg, wakeup]56 57  clocks:58    description:59      In general the core supports three types of clocks. bus_early is a60      SoC Bus Clock (AHB/AXI/Native). ref generates ITP when the UTMI/ULPI61      PHY is suspended. suspend clocks a small part of the USB3 core when62      SS PHY in P3. But particular cases may differ from that having less63      or more clock sources with another names.64 65  clock-names:66    contains:67      anyOf:68        - enum: [bus_early, ref, suspend]69        - true70 71  dma-coherent: true72 73  extcon:74    maxItems: 175    deprecated: true76 77  iommus:78    maxItems: 179 80  usb-phy:81    minItems: 182    items:83      - description: USB2/HS PHY84      - description: USB3/SS PHY85 86  phys:87    minItems: 188    maxItems: 1989 90  phy-names:91    minItems: 192    maxItems: 1993    oneOf:94      - items:95          enum: [ usb2-phy, usb3-phy ]96      - items:97          pattern: "^usb(2-([0-9]|1[0-4])|3-[0-3])$"98 99  power-domains:100    description:101      The DWC3 has 2 power-domains. The power management unit (PMU) and102      everything else. The PMU is typically always powered and may not have an103      entry.104    minItems: 1105    items:106      - description: Core107      - description: Power management unit108 109  resets:110    minItems: 1111 112  snps,usb2-lpm-disable:113    description: Indicate if we don't want to enable USB2 HW LPM for host114      mode.115    type: boolean116 117  snps,usb3_lpm_capable:118    description: Determines if platform is USB3 LPM capable119    type: boolean120 121  snps,usb2-gadget-lpm-disable:122    description: Indicate if we don't want to enable USB2 HW LPM for gadget123      mode.124    type: boolean125 126  snps,dis-start-transfer-quirk:127    description:128      When set, disable isoc START TRANSFER command failure SW work-around129      for DWC_usb31 version 1.70a-ea06 and prior.130    type: boolean131 132  snps,disable_scramble_quirk:133    description:134      True when SW should disable data scrambling. Only really useful for FPGA135      builds.136    type: boolean137 138  snps,has-lpm-erratum:139    description: True when DWC3 was configured with LPM Erratum enabled140    type: boolean141 142  snps,lpm-nyet-threshold:143    description: LPM NYET threshold144    $ref: /schemas/types.yaml#/definitions/uint8145 146  snps,u2exit_lfps_quirk:147    description: Set if we want to enable u2exit lfps quirk148    type: boolean149 150  snps,u2ss_inp3_quirk:151    description: Set if we enable P3 OK for U2/SS Inactive quirk152    type: boolean153 154  snps,req_p1p2p3_quirk:155    description:156      When set, the core will always request for P1/P2/P3 transition sequence.157    type: boolean158 159  snps,del_p1p2p3_quirk:160    description:161      When set core will delay P1/P2/P3 until a certain amount of 8B10B errors162      occur.163    type: boolean164 165  snps,del_phy_power_chg_quirk:166    description: When set core will delay PHY power change from P0 to P1/P2/P3.167    type: boolean168 169  snps,lfps_filter_quirk:170    description: When set core will filter LFPS reception.171    type: boolean172 173  snps,rx_detect_poll_quirk:174    description:175      when set core will disable a 400us delay to start Polling LFPS after176      RX.Detect.177    type: boolean178 179  snps,tx_de_emphasis_quirk:180    description: When set core will set Tx de-emphasis value181    type: boolean182 183  snps,tx_de_emphasis:184    description:185      The value driven to the PHY is controlled by the LTSSM during USB3186      Compliance mode.187    $ref: /schemas/types.yaml#/definitions/uint8188    enum:189      - 0 # -6dB de-emphasis190      - 1 # -3.5dB de-emphasis191      - 2 # No de-emphasis192 193  snps,dis_u3_susphy_quirk:194    description: When set core will disable USB3 suspend phy195    type: boolean196 197  snps,dis_u2_susphy_quirk:198    description: When set core will disable USB2 suspend phy199    type: boolean200 201  snps,dis_enblslpm_quirk:202    description:203      When set clears the enblslpm in GUSB2PHYCFG, disabling the suspend signal204      to the PHY.205    type: boolean206 207  snps,dis-u1-entry-quirk:208    description: Set if link entering into U1 needs to be disabled209    type: boolean210 211  snps,dis-u2-entry-quirk:212    description: Set if link entering into U2 needs to be disabled213    type: boolean214 215  snps,dis_rxdet_inp3_quirk:216    description:217      When set core will disable receiver detection in PHY P3 power state.218    type: boolean219 220  snps,dis-u2-freeclk-exists-quirk:221    description:222      When set, clear the u2_freeclk_exists in GUSB2PHYCFG, specify that USB2223      PHY doesn't provide a free-running PHY clock.224    type: boolean225 226  snps,dis-del-phy-power-chg-quirk:227    description:228      When set core will change PHY power from P0 to P1/P2/P3 without delay.229    type: boolean230 231  snps,dis-tx-ipgap-linecheck-quirk:232    description: When set, disable u2mac linestate check during HS transmit233    type: boolean234 235  snps,parkmode-disable-ss-quirk:236    description:237      When set, all SuperSpeed bus instances in park mode are disabled.238    type: boolean239 240  snps,parkmode-disable-hs-quirk:241    description:242      When set, all HighSpeed bus instances in park mode are disabled.243    type: boolean244 245  snps,dis_metastability_quirk:246    description:247      When set, disable metastability workaround. CAUTION! Use only if you are248      absolutely sure of it.249    type: boolean250 251  snps,dis-split-quirk:252    description:253      When set, change the way URBs are handled by the driver. Needed to254      avoid -EPROTO errors with usbhid on some devices (Hikey 970).255    type: boolean256 257  snps,gfladj-refclk-lpm-sel-quirk:258    description:259      When set, run the SOF/ITP counter based on ref_clk.260    type: boolean261 262  snps,resume-hs-terminations:263    description:264      Fix the issue of HS terminations CRC error on resume by enabling this265      quirk. When set, all the termsel, xcvrsel, opmode becomes 0 during end266      of resume. This option is to support certain legacy ULPI PHYs.267    type: boolean268 269  snps,ulpi-ext-vbus-drv:270    description:271      Some ULPI USB PHY does not support internal VBUS supply, and driving272      the CPEN pin, requires the configuration of the ulpi DRVVBUSEXTERNAL273      bit. When set, the xhci host will configure the USB2 PHY drives VBUS274      with an external supply.275    type: boolean276 277  snps,is-utmi-l1-suspend:278    description:279      True when DWC3 asserts output signal utmi_l1_suspend_n, false when280      asserts utmi_sleep_n.281    type: boolean282 283  snps,hird-threshold:284    description: HIRD threshold285    $ref: /schemas/types.yaml#/definitions/uint8286 287  snps,hsphy_interface:288    description:289      High-Speed PHY interface selection between UTMI+ and ULPI when the290      DWC_USB3_HSPHY_INTERFACE has value 3.291    $ref: /schemas/types.yaml#/definitions/string292    enum: [utmi, ulpi]293 294  snps,quirk-frame-length-adjustment:295    description:296      Value for GFLADJ_30MHZ field of GFLADJ register for post-silicon frame297      length adjustment when the fladj_30mhz_sdbnd signal is invalid or298      incorrect.299    $ref: /schemas/types.yaml#/definitions/uint32300    minimum: 0301    maximum: 0x3f302 303  snps,ref-clock-period-ns:304    description:305      Value for REFCLKPER field of GUCTL register for reference clock period in306      nanoseconds, when the hardware set default does not match the actual307      clock.308 309      This binding is deprecated. Instead, provide an appropriate reference clock.310    minimum: 8311    maximum: 62312    deprecated: true313 314  snps,rx-thr-num-pkt:315    description:316      USB RX packet threshold count. In host mode, this field specifies317      the space that must be available in the RX FIFO before the core can318      start the corresponding USB RX transaction (burst).319      In device mode, this field specifies the space that must be320      available in the RX FIFO before the core can send ERDY for a321      flow-controlled endpoint. It is only used for SuperSpeed.322      The valid values for this field are from 1 to 15. (DWC3 SuperSpeed323      USB 3.0 Controller Databook)324    $ref: /schemas/types.yaml#/definitions/uint8325    minimum: 1326    maximum: 15327 328  snps,rx-max-burst:329    description:330      Max USB RX burst size. In host mode, this field specifies the331      Maximum Bulk IN burst the DWC_usb3 core can perform. When the system332      bus is slower than the USB, RX FIFO can overrun during a long burst.333      You can program a smaller value to this field to limit the RX burst334      size that the core can perform. It only applies to SS Bulk,335      Isochronous, and Interrupt IN endpoints in the host mode.336      In device mode, this field specifies the NUMP value that is sent in337      ERDY for an OUT endpoint.338      The valid values for this field are from 1 to 16. (DWC3 SuperSpeed339      USB 3.0 Controller Databook)340    $ref: /schemas/types.yaml#/definitions/uint8341    minimum: 1342    maximum: 16343 344  snps,tx-thr-num-pkt:345    description:346      USB TX packet threshold count. This field specifies the number of347      packets that must be in the TXFIFO before the core can start348      transmission for the corresponding USB transaction (burst).349      This count is valid in both host and device modes. It is only used350      for SuperSpeed operation.351      Valid values are from 1 to 15. (DWC3 SuperSpeed USB 3.0 Controller352      Databook)353    $ref: /schemas/types.yaml#/definitions/uint8354    minimum: 1355    maximum: 15356 357  snps,tx-max-burst:358    description:359      Max USB TX burst size. When the system bus is slower than the USB,360      TX FIFO can underrun during a long burst. Program a smaller value361      to this field to limit the TX burst size that the core can execute.362      In Host mode, it only applies to SS Bulk, Isochronous, and Interrupt363      OUT endpoints. This value is not used in device mode.364      Valid values are from 1 to 16. (DWC3 SuperSpeed USB 3.0 Controller365      Databook)366    $ref: /schemas/types.yaml#/definitions/uint8367    minimum: 1368    maximum: 16369 370  snps,rx-thr-num-pkt-prd:371    description:372      Periodic ESS RX packet threshold count (host mode only). Set this and373      snps,rx-max-burst-prd to a valid, non-zero value 1-16 (DWC_usb31374      programming guide section 1.2.4) to enable periodic ESS RX threshold.375    $ref: /schemas/types.yaml#/definitions/uint8376    minimum: 1377    maximum: 16378 379  snps,rx-max-burst-prd:380    description:381      Max periodic ESS RX burst size (host mode only). Set this and382      snps,rx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31383      programming guide section 1.2.4) to enable periodic ESS RX threshold.384    $ref: /schemas/types.yaml#/definitions/uint8385    minimum: 1386    maximum: 16387 388  snps,tx-thr-num-pkt-prd:389    description:390      Periodic ESS TX packet threshold count (host mode only). Set this and391      snps,tx-max-burst-prd to a valid, non-zero value 1-16 (DWC_usb31392      programming guide section 1.2.3) to enable periodic ESS TX threshold.393    $ref: /schemas/types.yaml#/definitions/uint8394    minimum: 1395    maximum: 16396 397  snps,tx-max-burst-prd:398    description:399      Max periodic ESS TX burst size (host mode only). Set this and400      snps,tx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31401      programming guide section 1.2.3) to enable periodic ESS TX threshold.402    $ref: /schemas/types.yaml#/definitions/uint8403    minimum: 1404    maximum: 16405 406  tx-fifo-resize:407    description: Determines if the TX fifos can be dynamically resized depending408      on the number of IN endpoints used and if bursting is supported.  This409      may help improve bandwidth on platforms with higher system latencies, as410      increased fifo space allows for the controller to prefetch data into its411      internal memory.412    type: boolean413 414  tx-fifo-max-num:415    description: Specifies the max number of packets the txfifo resizing logic416      can account for when higher endpoint bursting is used. (bMaxBurst > 6) The417      higher the number, the more fifo space the txfifo resizing logic will418      allocate for that endpoint.419    $ref: /schemas/types.yaml#/definitions/uint8420    minimum: 3421 422  snps,incr-burst-type-adjustment:423    description:424      Value for INCR burst type of GSBUSCFG0 register, undefined length INCR425      burst type enable and INCRx type. A single value means INCRX burst mode426      enabled. If more than one value specified, undefined length INCR burst427      type will be enabled with burst lengths utilized up to the maximum428      of the values passed in this property.429    $ref: /schemas/types.yaml#/definitions/uint32-array430    minItems: 1431    maxItems: 8432    uniqueItems: true433    items:434      enum: [1, 4, 8, 16, 32, 64, 128, 256]435 436  num-hc-interrupters:437    maximum: 8438    default: 1439 440  port:441    $ref: /schemas/graph.yaml#/properties/port442    description:443      This port is used with the 'usb-role-switch' property  to connect the444      dwc3 to type C connector.445 446  ports:447    $ref: /schemas/graph.yaml#/properties/ports448    description:449      Those ports should be used with any connector to the data bus of this450      controller using the OF graph bindings specified if the "usb-role-switch"451      property is used.452 453    properties:454      port@0:455        $ref: /schemas/graph.yaml#/properties/port456        description: High Speed (HS) data bus.457 458      port@1:459        $ref: /schemas/graph.yaml#/properties/port460        description: Super Speed (SS) data bus.461 462  wakeup-source:463    $ref: /schemas/types.yaml#/definitions/flag464    description:465      Enable USB remote wakeup.466 467unevaluatedProperties: false468 469required:470  - compatible471  - reg472  - interrupts473 474examples:475  - |476    usb@4a030000 {477      compatible = "snps,dwc3";478      reg = <0x4a030000 0xcfff>;479      interrupts = <0 92 4>;480      usb-phy = <&usb2_phy>, <&usb3_phy>;481      snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;482    };483  - |484    usb@4a000000 {485      compatible = "snps,dwc3";486      reg = <0x4a000000 0xcfff>;487      interrupts = <0 92 4>;488      clocks = <&clk 1>, <&clk 2>, <&clk 3>;489      clock-names = "bus_early", "ref", "suspend";490      phys = <&usb2_phy>, <&usb3_phy>;491      phy-names = "usb2-phy", "usb3-phy";492      snps,dis_u2_susphy_quirk;493      snps,dis_enblslpm_quirk;494    };495...496