1. 13 Jun, 2017 1 commit
  2. 17 May, 2017 1 commit
    • William Wu's avatar
      usb: dwc3: add disable u2mac linestate check quirk · 65db7a0c
      William Wu authored
      This patch adds a quirk to disable USB 2.0 MAC linestate check
      during HS transmit. Refer the dwc3 databook, we can use it for
      some special platforms if the linestate not reflect the expected
      line state(J) during transmission.
      When use this quirk, the controller implements a fixed 40-bit
      TxEndDelay after the packet is given on UTMI and ignores the
      linestate during the transmit of a token (during token-to-token
      and token-to-data IPGAP).
      On some rockchip platforms (e.g. rk3399), it requires to disable
      the u2mac linestate check to decrease the SSPLIT token to SETUP
      token inter-packet delay from 566ns to 466ns, and fix the issue
      that FS/LS devices not recognized if inserted through USB 3.0 HUB.
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
      Signed-off-by: default avatarWilliam Wu <william.wu@rock-chips.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
  3. 11 Apr, 2017 4 commits
    • Roger Quadros's avatar
      usb: dwc3: Add dual-role support · 9840354f
      Roger Quadros authored
      If dr_mode is "otg" then support dual role mode of operation.
      Currently this mode is only supported when an extcon handle is
      present in the dwc3 device tree node. This is needed to
      get the ID status events of the port.
      We're using a workqueue to manage the dual-role state transitions
      as the extcon notifier (dwc3_drd_notifier) is called in an atomic
      context by extcon_sync() and this doesn't go well with
      usb_del_gadget_udc() causing a lockdep and softirq warning.
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    • Roger Quadros's avatar
      usb: dwc3: core: make dwc3_set_mode() work properly · 41ce1456
      Roger Quadros authored
      We can't have both Host and Peripheral roles active at the same time
      because of one detail on DWC3: it shares the same memory area for both
      Host and Peripheral registers.
      When swapping roles we must reinitialize the new role every
      time. Let's make sure this works for our debugfs interface.
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    • Roger Quadros's avatar
      usb: dwc3: core: add current_dr_role member · 6b3261a2
      Roger Quadros authored
      We're going to use this member to track which role we're currently
      playing, that way we can more easily implement dual-role swap in
      upcoming patches.
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    • Bryan O'Donoghue's avatar
      usb: dwc3: refactor gadget endpoint count calculation · 47d3946e
      Bryan O'Donoghue authored
      - DWC_USB3_NUM indicates the number of Device mode single directional
        endpoints, including OUT and IN endpoint 0.
      - DWC_USB3_NUM_IN_EPS indicates the maximum number of Device mode IN
        endpoints active at any time, including control endpoint 0.
      It's possible to configure RTL such that DWC_USB3_NUM_EPS is equal to
      dwc3-core calculates the number of OUT endpoints as DWC_USB3_NUM minus
      DWC_USB3_NUM_IN_EPS. If RTL has been configured with DWC_USB3_NUM_IN_EPS
      equal to DWC_USB3_NUM then dwc3-core will calculate the number of OUT
      endpoints as zero.
      For example a from dwc3_core_num_eps() shows:
      [    1.565000]  /usb0@f01d0000: found 8 IN and 0 OUT endpoints
      This patch refactors the endpoint calculation down to one variable
      dwc->num_eps taking care to maintain the current mapping of endpoints for
      fixed FPGA configurations as described in Table 4-7 of version 2.60a of the
      DWC USB3 databook.
      The endpoint mapping will then be EP-OUT, EP-IN etc, up to DWC_USB3_NUM.
      If DWC_USB3_NUM is odd then OUT will take the extra endpoint.
      Suggested-by: default avatarFelipe Balbi <balbi@kernel.org>
      Signed-off-by: default avatarBryan O'Donoghue <pure.logic@nexus-software.ie>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
  4. 27 Mar, 2017 1 commit
  5. 18 Nov, 2016 6 commits
  6. 08 Nov, 2016 1 commit
  7. 03 Nov, 2016 6 commits
  8. 31 Oct, 2016 1 commit
  9. 07 Sep, 2016 1 commit
    • Thinh Nguyen's avatar
      usb: dwc3: Fix dr_mode validation · 9d6173e1
      Thinh Nguyen authored
      This patch follows the similar fix in dwc2. See
      commit 5268ed9d ("usb: dwc2: Fix dr_mode validation")
      Currently, the dr_mode is only checked against the module configuration.
      It also needs to be checked against the hardware capablities.
      The driver now checks if both the module configuration and hardware are
      capable of the dr_mode value. If not, then it will issue a warning and
      fall back to a supported value. If it is unable to fall back to a
      suitable value, then the probe will fail.
      Behavior summary:
            module          :  actual
       HW   config  dr_mode :  dr_mode
       host  host   any     :  host
       host  dev    any     :  INVALID
       host  otg    any     :  host
       dev   host   any     :  INVALID
       dev   dev    any     :  dev
       dev   otg    any     :  dev
       otg   host   any     :  host
       otg   dev    any     :  dev
       otg   otg    any     :  dr_mode
      Signed-off-by: default avatarThinh Nguyen <thinhn@synopsys.com>
      Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
  10. 25 Aug, 2016 5 commits
  11. 22 Aug, 2016 1 commit
  12. 21 Jun, 2016 3 commits
  13. 20 Jun, 2016 6 commits
  14. 19 Apr, 2016 2 commits
  15. 18 Apr, 2016 1 commit