25 Commits

Author SHA1 Message Date
Sebastian Holzapfel
a2ee90fbfe usb: stm32fx07 -> usb_dwc_common
The stm32fx07 is common DesignWare IP, used in both STM32 and EFM32 chips.
Rename the files to make this more clear, and easier to use in other
targets.
2018-03-02 22:42:05 +00:00
David Sidrane
cf80e2bd5e stm32f4: USB support for newer OTG cores
Support for the  conflicting bit definitions for vbus sensing on core id
version 0x2000+

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2017-01-10 22:32:20 +00:00
Karl Palsson
825b51a6a8 usb: dwc_otg: fix missing includes
Went awol merging something :(
(Yes, dwc_otg is theoretically shared with efm and co, but at present
it's still pretty much the stm32 version)

Fixes: 422d708384c76b8bf3a860bdd084e3010e28afa0
2016-11-21 17:27:43 +00:00
Karl Palsson
422d708384 usb: dwc_otg: enable clocks automatically.
ST usbfs-v1, v2, EFM32 USB, lm4f usb all automatically enable the clock
in their _init routine.  Do the same for the dwc_otg drivers to be
consistent.
2016-11-21 17:17:32 +00:00
Amir Hammad
6357630a90 stm32/usb: otg_fs and otg_hs register definitions
* USB host register definitions added.
* Extracted common register and bitfield definitions
	from 'otg_fs.h' and 'otg_hs.h'
	into new file 'otg_common.h'.
	Modified usb low-level drivers to adopt to new style of bitfields.
* Fixed typo OTG_GOTGIN -> OTG_GOTGINT (according to the datasheet)

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-16 22:13:53 +00:00
Frantisek Burian
0cc0134f21 usb: Only enable the SOF interrupt if user_callback_sof is given.
Otherwise we get 1 kHz of SOF interrupts even if we don't need them.

Originally reported by Uwe in https://github.com/libopencm3/libopencm3/pull/274
but BuFran provided a reworked implementation.
2015-07-15 00:22:18 +00:00
Piotr Esden-Tempski
7df63fcae0 First coarse run to fix coding style in locm3.
Added --terse and --mailback options to the make stylecheck target. It
also does continue even if it enounters a possible error.

We decided on two exceptions from the linux kernel coding standard:
- Empty wait while loops may end with ; on the same line.
- All blocks after while, if, for have to be in brackets even if they
  only contain one statement. Otherwise it is easy to introduce an
  error.

Checkpatch needs to be adapted to reflect those changes.
2013-06-12 18:22:56 -07:00
Jason Kotzin
34beeae925 USB core updated for reentrance based on Christian Cier-Zniewski's branch 2012-09-13 10:43:35 -07:00
Piotr Esden-Tempski
43561de329 License change of the library to LGPL, version 3 or later.
Agreed to by all the significant contributors to the library.
2012-03-02 14:44:49 -08:00
Mike Smith
7da1967056 Add an interface for soft disconnection, and hook it up in the F107 driver. 2012-02-12 15:00:08 -08:00
Gareth McMullin
651917aeb4 Added USB example for stm32f4.
Moved clock enable for OTG_FS back into applications.  This and gpio config
are the only differences between f107 and f2xx/f4xx.
2011-12-17 14:11:39 +13:00
Uwe Hermann
3e9b9cb345 usb: Coding-style fixes. 2011-11-17 00:12:43 +01:00
Gareth McMullin
30e188cf07 Only allow one packet in TX fifos.
This fixes a problem where packets were written too quickly.
The hardware disabled the endpoint after the fist packet is sent,
and others just waited in the queue.
2011-11-12 21:44:37 +13:00
Gareth McMullin
e0fe43357d usb_f107: Fixed lost 4 bytes on control OUT transaction. 2011-10-31 14:09:41 -07:00
Uwe Hermann
788f3870c4 Merge remote-tracking branch 'fnoble/stm32f2' 2011-10-29 22:19:12 +02:00
Gareth McMullin
284be93037 Restored OTG clock enable in RCC in f107 usb init. 2011-10-29 23:57:10 +13:00
Gareth McMullin
b05a5dcf2a Fixed some F105/F107 USB issues. Added user callback on SOF.
Made examples depend on lib.
2011-10-29 21:30:26 +13:00
Fergus Noble
7518bc83c1 Fixing some header references 2011-10-12 22:20:22 -04:00
Uwe Bonnes
32c276a708 Move enabling the USB Clock into stm32f10x_usbd_init 2011-07-13 10:04:03 +02:00
Gareth McMullin
3d820c6ed7 Fixed stm32f107 usb driver to allow calling usbd_poll from irq handler. 2011-04-04 17:39:05 +12:00
Gareth McMullin
ef0ff192f7 Added usbd_ep_nak_set() to force flow control on OUT endpoints. 2011-03-30 07:17:02 +13:00
Gareth McMullin
6bbc4c2f7c Fixed non-control endpoints for connectivity line USB. 2011-03-15 20:33:02 +13:00
Gareth McMullin
bf0d1a7b41 Connectivity line USB driver now enumerating correctly. 2011-03-14 20:31:32 +13:00
Gareth McMullin
554feb7f27 USB driver for Connectivity-line devices partially working. 2011-02-20 12:28:23 +13:00
Gareth McMullin
e64a9d2bf9 Minor cleanup of usb. Template driver for STM32F107 added. 2011-02-10 19:58:51 +13:00