summaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix for reception of large full speed isochronous frames via the transactionHans Petter Selasky2018-10-161-7/+22
| | | | | | | | | | | | | | | translator, when using the DWC OTG USB controller driver. Make sure to re-try getting the complete split packets until a DATA0 packet is received. Larger isochronous frames may be split into multiple MDATA packets terminated by a single DATA0 packet. PR: 230434 MFC after: 3 days Approved by: re (gjb) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=339388
* Remove Atmel AT91RM9200 and AT91SAM9 support.Warner Losh2018-07-278-3944/+0
| | | | | | | | | | | | | | The last known robust version of this code base was FreeBSD 8.2. There are no users of this on current, and all users of it have abandoned this platform or are in legacy mode with a prior version of FreeBSD. All known users on arm@ approved this removal, and there were no objections. Differential Revision: https://reviews.freebsd.org/D16312 Notes: svn path=/head/; revision=336770
* Remove kernel support for armebWarner Losh2018-07-171-323/+0
| | | | | | | | | | Remove all the big-endian arm architectures (ixp425 and ixp435) support in the kernel and associated drivers. Differential Revision: https://reviews.freebsd.org/D16257 Notes: svn path=/head/; revision=336436
* Add PCI IDs for AMD X370 AHCI and XHCI.Mark Johnston2018-07-121-1/+2
| | | | | | | | | Submitted by: Greg V <greg@unrelenting.technology> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15398 Notes: svn path=/head/; revision=336225
* Detach all children before beginning to tear down the hardware, instead ofIan Lepore2018-07-051-9/+6
| | | | | | | | | doing it last. Also, remove the local tracking of whether usb's busdma memory allocation got done, because it's safe to call the free_all function even if it wasn't. Notes: svn path=/head/; revision=335989
* Describe Fresco Logic FL1100 USB 3.0 controllers.Marius Strobl2018-05-281-0/+2
| | | | Notes: svn path=/head/; revision=334293
* Improve fix in r304629 by allowing configuration of the behaviourHans Petter Selasky2018-04-303-5/+18
| | | | | | | | | | | | | through a SYSCTL instead of a compile time define. Add quirk by default for all LynxPoint XHCI controllers. PR: 227602 MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=333100
* Clean up OF_getprop_alloc APIOleksandr Tymoshenko2018-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | OF_getprop_alloc takes element size argument and returns number of elements in the property. There are valid use cases for such behavior but mostly API consumers pass 1 as element size to get string properties. What API users would expect from OF_getprop_alloc is to be a combination of malloc + OF_getprop with the same semantic of return value. This patch modifies API signature to match these expectations. For the valid use cases with element size != 1 and to reduce modification scope new OF_getprop_alloc_multi function has been introduced that behaves the same way OF_getprop_alloc behaved prior to this patch. Reviewed by: ian, manu Differential Revision: https://reviews.freebsd.org/D14850 Notes: svn path=/head/; revision=332310
* If sc->sc_ep_max is already set use it to find the number of RX and TXAndrew Turner2018-03-231-6/+11
| | | | | | | | | | | | | endpoints. The Allwinner driver will need to set this as the EPINFO register isn't useful there. Submitted by: jmcneill Reviewed by: hselasky Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D5881 Notes: svn path=/head/; revision=331421
* Increase the size of the endpoint buffers. They are double buffered soAndrew Turner2018-03-221-1/+1
| | | | | | | | | need to be twice the size. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=331360
* Use a table to find the endpoint configurationAndrew Turner2018-03-212-28/+52
| | | | | | | | | | | | | On the Allwinner SoCs we need to set a custom endpoint configuration. To allow for this use a table to store the configuration so the attachment can override it. Reviewed by: hselasky Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14783 Notes: svn path=/head/; revision=331306
* Do not try to deallocate memory that wasn't allocated (you'd think thatIan Lepore2018-02-171-1/+4
| | | | | | | | | | | | would be safe, but the function also tries to destroy mutexes that never got created). I guess this can only happen when imx_ehci_detach() is called on the error-exit path from imx_ehci_attach(), and that path never got exercised before today. Notes: svn path=/head/; revision=329479
* Add basic driver for Qualcomm USB 2.0 EHCI controller.Ruslan Bukin2018-01-251-0/+231
| | | | | | | | | | | This driver relies on system initialization in u-boot. Tested on DragonBoard 410c. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=328402
* Convert extres/phy to kobj model.Michal Meloun2018-01-201-2/+2
| | | | | | | | | | | | | | Similarly as other extres pseudo-drivers, implement phy by using kobj model. This detaches it from provider device, so single device driver can export multiple different phys. Additionally, this allows phy to be subclassed to more specialized drivers, like is USB OTG phy, or PCIe phy with hot-plug capability. Tested by: manu (previous version, on Allwinner board) MFC after: 1 month Notes: svn path=/head/; revision=328201
* Add AHCI/XHCI device IDs found on AMD 1950X+X399 systemConrad Meyer2017-12-291-0/+2
| | | | | | | | | A follow-up to r327094. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327364
* Do pass removing some write-only variables from the kernel.Alexander Kabaev2017-12-254-10/+1
| | | | | | | | | | | | This reduces noise when kernel is compiled by newer GCC versions, such as one used by external toolchain ports. Reviewed by: kib, andrew(sys/arm and sys/arm64), emaste(partial), erj(partial) Reviewed by: jhb (sys/dev/pci/* sys/kern/vfs_aio.c and sys/kern/kern_synch.c) Differential Revision: https://reviews.freebsd.org/D10385 Notes: svn path=/head/; revision=327173
* Add AHCI/XHCI device IDs found on AMD Ryzen+B350 system.Alexander Motin2017-12-221-0/+4
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=327094
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2740-0/+80
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326022
* Improve HW type checking in mv_ehci driverMarcin Wojtas2017-09-111-8/+19
| | | | | | | | | | | | | | | This patch adds hwtype parameter which keeps information about hardware revision of Marvell EHCI controller. It allows to replace multiple calls to ofw_bus_is_compatible with comparing hwtype value during driver initialization. Submitted by: Patryk Duda <pdk@semihalf.com> Suggested by: ian Obtained from: Semihalf Sponsored by: Semihalf Notes: svn path=/head/; revision=323432
* Add support for Armada 3700 EHCIMarcin Wojtas2017-09-091-7/+12
| | | | | | | | | | | | | | This patch reuses ehci_mv driver by adding a support for the new compatible string and adding ehci_mv.c to list of available options for arm64 platforms. Submitted by: Patryk Duda <pdk@semihalf.com> Obtained from: Semihalf Sponsored by: Semihalf Differential Revision: https://reviews.freebsd.org/D12255 Notes: svn path=/head/; revision=323357
* Add support for xhci in Armada 3700 and 7k/8kMarcin Wojtas2017-09-091-0/+2
| | | | | | | | | | | | | | | | This driver will be used by Marvell Armada 3700 and 7k/8k SoC families. The same, generic xhci device also appears in Armada 380, so we are reusing driver. This patch also adds xhci_mv.c entry to the arm64 files list. Submitted by: Patryk Duda <pdk@semihalf.com> Obtained from: Semihalf Sponsored by: Semihalf Differential Revision: https://reviews.freebsd.org/D12252 Notes: svn path=/head/; revision=323353
* Add new Intel Lewisburg and Union Point chipset PCI IDs.Alexander Motin2017-08-091-0/+4
| | | | | | | | | While there, polish some old AHCI ones, since they are still reused. MFC after: 1 week Notes: svn path=/head/; revision=322308
* Put an #ifdef notyet wrapper around a function that's not being used yet,Ian Lepore2017-07-131-0/+2
| | | | | | | to avoid compile warnings. Notes: svn path=/head/; revision=320929
* Support the "disable-over-current" property for imx ehci controllers.Ian Lepore2017-07-131-15/+170
| | | | | | | | | | It turns out that this is more than a power optization. The OTG port won't work on boards that have this property unless this setting is honored. Also ensure that the usb phy device attaches before ehci. Notes: svn path=/head/; revision=320928
* Implement fix for BULK IN-token retry mechanism. When the hardware isHans Petter Selasky2017-07-071-2/+27
| | | | | | | | | | | | | | | | programmed for infinite IN token retry after NAK, the SAF1761 hardware, however, does not retry the IN-token. This problem is described in the SAF1761 errata, section 18.1.1. While at it: - Add some minor chip specific initialization for RTEMS. - Add debug print for status registers in the interrupt filter. Submitted by: Christian Mauderer <christian.mauderer@embedded-brains.de> MFC after: 1 week Notes: svn path=/head/; revision=320773
* Add some device IDs for Intel Denverton SoCs.Alexander Motin2017-06-211-0/+2
| | | | Notes: svn path=/head/; revision=320178
* Describe Intel Apollo Lake and Braswell USB 3.0 controllers.Marius Strobl2017-05-141-0/+4
| | | | Notes: svn path=/head/; revision=318276
* Add IDs for Intel Cougar Point USB 2.0 controller.Alexander Motin2017-04-021-0/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=316412
* Add compatible string.Ruslan Bukin2017-02-281-1/+7
| | | | | | | | | | This restores USB attaching on SOCKIT board after reusing standard DTS files. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=314390
* Add ID for NEC uPD720202 xHCI controller.Bruce M Simpson2017-02-271-0/+2
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=314345
* Enable usb low and full speed devices connected to the imx6 root hubs.Ian Lepore2017-02-121-1/+2
| | | | | | | | | | This enables the PHY circuitry for UTMI+ level 2 and 3, and sets the flag to tell the ehci code that the root hub has a transaction translator in it. For imx6 we can use the standard ehci_get_port_speed_portsc() function to find out what speed device is connected to the port. Notes: svn path=/head/; revision=313674
* Fix problem with suspend and resume when using Skylake chipsets. MakeHans Petter Selasky2017-01-193-16/+35
| | | | | | | | | | | | | | sure the XHCI controller is reset after halting it. The problem is clearly a BIOS bug as the suspend and resume is failing without loading the XHCI driver. The same happens when using Linux and the XHCI driver is not loaded. Submitted by: Yanko Yankulov <yanko.yankulov@gmail.com> PR: 216261 MFC after: 1 week Notes: svn path=/head/; revision=312424
* Use the post-reset hook to force the controller to host mode. This willIan Lepore2017-01-101-2/+19
| | | | | | | | make both usb ports work on imx6 systems (the OTG port of course will only work in host mode). Notes: svn path=/head/; revision=311850
* Declare dwc_otg_detach as non-static (same as dwc_otg_attach),Ruslan Bukin2016-11-172-2/+2
| | | | | | | | | | so it can be called from fdt-glue drivers. Submitted by: kan Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=308755
* Allow operation with UTMI+ phy.Ruslan Bukin2016-11-172-8/+26
| | | | | | | | Submitted by: kan Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=308752
* Add some device IDs found in my new laptop.Alexander Motin2016-11-091-0/+2
| | | | Notes: svn path=/head/; revision=308464
* Fix device delete child function.Hans Petter Selasky2016-10-1718-111/+0
| | | | | | | | | | | | | | | | | | | | | | | When detaching device trees parent devices must be detached prior to detaching its children. This is because parent devices can have pointers to the child devices in their softcs which are not invalidated by device_delete_child(). This can cause use after free issues and panic(). Device drivers implementing trees, must ensure its detach function detaches or deletes all its children before returning. While at it remove now redundant device_detach() calls before device_delete_child() and device_delete_children(), mostly in the USB controller drivers. Tested by: Jan Henrik Sylvester <me@janh.de> Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D8070 MFC after: 2 weeks Notes: svn path=/head/; revision=307518
* Make BCM28x USB driver compatible with upstream device treeOleksandr Tymoshenko2016-10-121-1/+6
| | | | | | | | | This should have been committed in r307093: resource allocation depends on source of the device tree. upstream dts has extra interrupt that we can ignore Notes: svn path=/head/; revision=307098
* Don't separate the status stage of the XHCI USB control transfers intoHans Petter Selasky2016-08-221-0/+4
| | | | | | | | | | | | | its own job because this breaks the simplified QEMU XHCI TRB parser, which expects the complete USB control transfer as a series of back to back TRBs. The old behaviour is kept under #ifdef in case this change breaks enumeration of any USB devices. PR: 212021 MFC after: 1 week Notes: svn path=/head/; revision=304629
* Fix for invalid use of bits in input context. Basically splitHans Petter Selasky2016-08-221-6/+8
| | | | | | | | | | | | | configuring of EP0 and non-EP0 into xhci_cmd_evaluate_ctx() and xhci_cmd_configure_ep() respectivly. This resolves some errors when using XHCI under QEMU and gets is more in line with the XHCI specification. PR: 212021 MFC after: 1 week Notes: svn path=/head/; revision=304597
* sys/dev: replace comma with semicolon when pertinent.Pedro F. Giffuni2016-08-091-6/+6
| | | | | | | | | | | | | Uses of commas instead of a semicolons can easily go undetected. The comma can serve as a statement separator but this shouldn't be abused when statements are meant to be standalone. Detected with devel/coccinelle following a hint from DragonFlyBSD. MFC after: 1 month Notes: svn path=/head/; revision=303891
* Add a generic EHCI USB driver based on the Allwinner A10 driver. It is ACPIAndrew Turner2016-07-291-0/+220
| | | | | | | | | | | | | only for now, but wouldn't be too difficult to add support for FDT. Reviewed by: hselasky Obtained from: ABT Systems Ltd MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7352 Notes: svn path=/head/; revision=303475
* EXTRES: Add OF node as argument to all <foo>_get_by_ofw_<bar>() functions.Michal Meloun2016-07-101-3/+3
| | | | | | | | | | | In some cases, the driver must handle given properties located in specific OF subnode. Instead of creating duplicate set of function, add 'node' as argument to existing functions, defaulting it to device OF node. MFC after: 3 weeks Notes: svn path=/head/; revision=302528
* Fix regression issue with XHCI on 32-bit ARMv7 Armada-38x. Make sureHans Petter Selasky2016-07-061-1/+1
| | | | | | | | | | "struct xhci_dev_ctx_addr" fits into a single 4K page until further. Approved by: re (hrs) MFC after: 1 week Notes: svn path=/head/; revision=302371
* Fix interrupt loop when switching from USB device to USB host mode byHans Petter Selasky2016-07-041-16/+18
| | | | | | | | | | | clearing all endpoint interrupt bits. PR: 210736 Approved by: re (glebius) MFC after: 1 week Notes: svn path=/head/; revision=302336
* Fix detection of USB device disconnects in USB host mode when the USBHans Petter Selasky2016-07-011-1/+4
| | | | | | | | | | | | device is connected directly to the USB port of the DWC OTG, in this case a RPI-zero. PR: 210695 Approved by: re (gjb) MFC after: 1 week Notes: svn path=/head/; revision=302306
* Update the definition for number of scratch pages to match the latestHans Petter Selasky2016-06-223-7/+8
| | | | | | | | | | | | version of the XHCI specification. Make sure the code can handle the maximum number of allowed scratch pages. Submitted by: Shichun_Ma@Dell.com Approved by: re (hrs) MFC after: 1 week Notes: svn path=/head/; revision=302076
* Enable USB PHY regulators when requested by the host controller driver.Jared McNeill2016-05-261-0/+19
| | | | | | | | | Previously the USB PHY driver would enable all regulators at attach time. This prevented boards from booting when powered by the USB OTG port, as it didn't take VBUS presence into consideration. Notes: svn path=/head/; revision=300728
* Fix bad sizeof().Hans Petter Selasky2016-05-191-1/+1
| | | | | | | | Submitted by: David Binderman <dcb314@hotmail.com> PR: 209636 Notes: svn path=/head/; revision=300200