1. 17 2月, 2016 1 次提交
    • J
      usb: dwc3: Fix assignment of EP transfer resources · c4509601
      John Youn 提交于
      The assignement of EP transfer resources was not handled properly in the
      dwc3 driver. Commit aebda618 ("usb: dwc3: Reset the transfer
      resource index on SET_INTERFACE") previously fixed one aspect of this
      where resources may be exhausted with multiple calls to SET_INTERFACE.
      However, it introduced an issue where composite devices with multiple
      interfaces can be assigned the same transfer resources for different
      endpoints. This patch solves both issues.
      
      The assignment of transfer resources cannot perfectly follow the data
      book due to the fact that the controller driver does not have all
      knowledge of the configuration in advance. It is given this information
      piecemeal by the composite gadget framework after every
      SET_CONFIGURATION and SET_INTERFACE. Trying to follow the databook
      programming model in this scenario can cause errors. For two reasons:
      
      1) The databook says to do DEPSTARTCFG for every SET_CONFIGURATION and
      SET_INTERFACE (8.1.5). This is incorrect in the scenario of multiple
      interfaces.
      
      2) The databook does not mention doing more DEPXFERCFG for new endpoint
      on alt setting (8.1.6).
      
      The following simplified method is used instead:
      
      All hardware endpoints can be assigned a transfer resource and this
      setting will stay persistent until either a core reset or hibernation.
      So whenever we do a DEPSTARTCFG(0) we can go ahead and do DEPXFERCFG for
      every hardware endpoint as well. We are guaranteed that there are as
      many transfer resources as endpoints.
      
      This patch triggers off of the calling dwc3_gadget_start_config() for
      EP0-out, which always happens first, and which should only happen in one
      of the above conditions.
      
      Fixes: aebda618 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE")
      Cc: <stable@vger.kernel.org> # v3.2+
      Reported-by: NRavi Babu <ravibabu@ti.com>
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@kernel.org>
      c4509601
  2. 15 12月, 2015 1 次提交
    • F
      usb: dwc3: gadget: handle request->zero · 04c03d10
      Felipe Balbi 提交于
      So far, dwc3 has always missed request->zero
      handling for every endpoint. Let's implement
      that so we can handle cases where transfer must
      be finished with a ZLP.
      
      Note that dwc3 is a little special. Even though
      we're dealing with a ZLP, we still need a buffer
      of wMaxPacketSize bytes; to hide that detail from
      every gadget driver, we have a preallocated buffer
      of 1024 bytes (biggest bulk size) to use (and
      share) among all endpoints.
      Reported-by: NRavi B <ravibabu@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      04c03d10
  3. 10 10月, 2015 2 次提交
    • J
      usb: dwc3: Add dis_enblslpm_quirk · ec791d14
      John Youn 提交于
      Add a quirk to clear the GUSB2PHYCFG.ENBLSLPM bit, which controls
      whether the PHY receives the suspend signal from the controller.
      
      Cc: <stable@vger.kernel.org> # v3.18+
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ec791d14
    • J
      usb: dwc3: Support Synopsys USB 3.1 IP · 690fb371
      John Youn 提交于
      This patch allows the dwc3 driver to run on the new Synopsys USB 3.1
      IP core, albeit in USB 3.0 mode only.
      
      The Synopsys USB 3.1 IP (DWC_usb31) retains mostly the same register
      interface and programming model as the existing USB 3.0 controller IP
      (DWC_usb3). However the GSNPSID and version numbers are different.
      
      Add checking for the new ID to pass driver probe.
      
      Also, since the DWC_usb31 version number is lower in value than the
      full GSNPSID of the DWC_usb3 IP, we set the high bit to identify
      DWC_usb31 and to ensure the values are higher.
      
      Finally, add a documentation note about the revision numbering scheme.
      Any future revision checks (for STARS, workarounds, and new features)
      should take into consideration how it applies to both the 3.1/3.0 IP.
      
      Cc: <stable@vger.kernel.org> # v3.18+
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      690fb371
  4. 27 9月, 2015 1 次提交
  5. 26 5月, 2015 1 次提交
  6. 14 5月, 2015 4 次提交
  7. 11 3月, 2015 1 次提交
  8. 30 1月, 2015 1 次提交
  9. 13 1月, 2015 1 次提交
  10. 04 11月, 2014 15 次提交
  11. 05 9月, 2014 2 次提交
  12. 01 7月, 2014 1 次提交
    • P
      usb: dwc3: add support for USB 2.0-only core configuration · 0e1e5c47
      Paul Zimmerman 提交于
      Newer DWC3 controllers can be built for USB 2.0-only mode, where
      most of the USB 3.0 circuitry is left out. To support this mode,
      the driver must limit the speed programmed into the DCFG register
      to Hi-Speed or lower.
      
      Reads and writes to the PIPECTL register are left as-is, since
      they should be no-ops in USB 2.0-only mode. Calls to phy_init()
      etc. for the USB3 phy are also left as-is, since the no-op USB3
      phy should be used for USB 2.0-only mode controllers.
      Signed-off-by: NPaul Zimmerman <paulz@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      0e1e5c47
  13. 06 3月, 2014 5 次提交
  14. 05 3月, 2014 4 次提交