summaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller
Commit message (Collapse)AuthorAgeFilesLines
* MFC: r314345, r318276Marius Strobl2017-05-181-0/+6
| | | | | | | | - Add ID for NEC uPD720202 xHCI controller. - Describe Intel Apollo Lake and Braswell USB 3.0 controllers. Notes: svn path=/stable/11/; revision=318498
* MFC r316412: Add IDs for Intel Cougar Point USB 2.0 controller.Alexander Motin2017-04-091-0/+4
| | | | Notes: svn path=/stable/11/; revision=316650
* MFC r312424:Hans Petter Selasky2017-03-143-16/+35
| | | | | | | | | | | | | | Fix problem with suspend and resume when using Skylake chipsets. Make 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 Notes: svn path=/stable/11/; revision=315251
* MFC r313674:Ian Lepore2017-03-011-1/+2
| | | | | | | Enable usb low and full speed devices connected to the imx6 root hubs. Notes: svn path=/stable/11/; revision=314513
* MFC r311850:Ian Lepore2017-02-111-2/+19
| | | | | | | | | Use the post-reset hook to force the controller to host mode. This will make both usb ports work on imx6 systems (the OTG port of course will only work in host mode). Notes: svn path=/stable/11/; revision=313649
* MFC r308464, r308471: Add some device IDs found in my new laptop.Alexander Motin2016-11-161-0/+2
| | | | Notes: svn path=/stable/11/; revision=308738
* MFC r307518:Hans Petter Selasky2016-11-0718-111/+0
| | | | | | | | | | | | | | | | | | | | | | | | Fix device delete child function. 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 Notes: svn path=/stable/11/; revision=308401
* MFC r302523,r302528:Michal Meloun2016-11-051-3/+3
| | | | | | | | | | | | | | r302523: Add clk_get_by_ofw_node_index, which is like clk_get_by_ofw_index but operates on a specific OF node instead of the pass in device's OF node. r302528: EXTRES: Add OF node as argument to all <foo>_get_by_ofw_<bar>() functions. 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. Notes: svn path=/stable/11/; revision=308324
* MFC r307067, r307068, r307087, r307088, r307089,Oleksandr Tymoshenko2016-10-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r307091, r307092, r307093, r307095, r307098, r307115: r307067: Make intc driver compatible with upstream DTS - Fix compatibility strings - Properly decode upstream's two-cell interrupt specs. Our home-made dts does not have two-cell interrupts so no need to preserve backward compatibility r307068: Make Rapsberry Pi watchdog driver compatible with upstream DTS - Fix compatibility strings - Compensate the difference in base address for our custom DTS and upstream one (for backward compatibility) r307087: Make sure intc is attached before interrupt consumers If pass order is not specified devices are attached in the order they are defined in dts. Some interrupt consumers may be defined before intc. Also make sure intc interrupt-parent local_intc is attached before intc itself. r307088: Add compatible strings used in upstream dts files r307089: Make framebuffer driver compatible with upstream DT - Add compatibility string - Add simplebus as possible parent bus r307091: Add compatibility string from upstream DT r307092: Make BCM2835 GPIO driver compatible with upstream DT - Add compatibility string - Make reserverd and read-only properties optional r307093: Make BCM283x USB driver compatible with upstream DT - Make resource allocation logic depend on compatibility string to check what format of DTS node should be used - FreeBSD's or upstream r307095: Make VCHI driver compatible with upstream DT - Add compatibility string - Compensate difference in base address between our custom DTB and upstream one r307098: Make BCM28x USB driver compatible with upstream device tree 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 r307115: Fix typo in comment Spotted by: loos Notes: svn path=/stable/11/; revision=307575
* MFC r303891, r303892:Pedro F. Giffuni2016-09-081-6/+6
| | | | | | | | | | | sys: replace comma with semicolon when pertinent. 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. Notes: svn path=/stable/11/; revision=305614
* MFC 303299, 303475:Andrew Turner2016-09-071-0/+220
| | | | | | | | | | | - Enable the generic OHCI driver on arm64 - Add a generic EHCI USB driver based on the Allwinner A10 driver Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=305543
* MFC r304629:Hans Petter Selasky2016-08-291-0/+4
| | | | | | | | | | | | | Don't separate the status stage of the XHCI USB control transfers into 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 Notes: svn path=/stable/11/; revision=304999
* MFC r304597:Hans Petter Selasky2016-08-291-6/+8
| | | | | | | | | | | | | Fix for invalid use of bits in input context. Basically split 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 Notes: svn path=/stable/11/; revision=304992
* 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
* Add driver for "generic-ohci" as defined by FDT.Emmanuel Vadot2016-05-172-0/+368
| | | | | | | | | | | | | | | If platform support EXT_RESOURCES, clocks and resets are handled out of the box. If not driver can be subclassed using the generic_usb interface. generic_usb name was choosed because at one point I'll add generic-ehci FDT driver. Reviewed by: jmcneill, hselasky Approved by: andrew (mentor) Differential Revision: https://reviews.freebsd.org/D5481 Notes: svn path=/head/; revision=300068
* Use OF_prop_free instead of direct call to free(9)Oleksandr Tymoshenko2016-05-141-1/+1
| | | | Notes: svn path=/head/; revision=299747
* Add some device IDs from Intel Sunrise Point chipsets.Alexander Motin2016-05-031-0/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=298983
* dev/usb: minor spelling fixes in comments.Pedro F. Giffuni2016-05-026-8/+8
| | | | | | | | | No functional change. Reviewed by: hselasky Notes: svn path=/head/; revision=298932
* sys/dev: extend use of the howmany() macro when available.Pedro F. Giffuni2016-04-263-8/+6
| | | | | | | | We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Notes: svn path=/head/; revision=298646
* Remove misleading comment. musb supports host mode for more than two years nowOleksandr Tymoshenko2016-04-051-1/+0
| | | | | | | Spotted by: jmcneill Notes: svn path=/head/; revision=297587
* ehci_interrupt is MPSAFE code. Most drivers in tree calls bus_setup_intrMichal Meloun2016-04-052-3/+3
| | | | | | | | | | with MPSAFE, some are not. Fix those. Submitted by: Howard Su <howard0su@gmail.com> Differential Revision: https://reviews.freebsd.org/D5755 Notes: svn path=/head/; revision=297579
* Add some device IDs found on AMD FCH shipsets.Alexander Motin2016-03-293-1/+7
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=297387
* Add more UHCI PCI IDs.Hans Petter Selasky2016-03-241-0/+6
| | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> Notes: svn path=/head/; revision=297229
* Add IDs for Intel Wellsburg USB controllers.Alexander Motin2016-03-192-0/+6
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=297049
* Add xhci_mv.cWojciech Macek2016-03-141-0/+232
| | | | | | | | | | | | | | Add missing xhci driver for Marvell systems. Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: hselasky Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D5031 Notes: svn path=/head/; revision=296827
* Configure the correct bMaxPacketSize for control endpoints beforeHans Petter Selasky2016-02-232-0/+14
| | | | | | | | | | | | | | | requesting the initial complete device descriptor and not as part of the subsequent babble error recovery. Babble means that the received USB packet was bigger than than configured maximum packet size. This only affects enumeration of FULL speed USB devices which use a bMaxPacketSize different from 8 bytes. This patch might help fix enumeration of USB devices which exhibit USB I/O errors in dmesg during boot. MFC after: 1 week Notes: svn path=/head/; revision=295928
* Correct PCI device description.Hans Petter Selasky2016-02-101-1/+1
| | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> Notes: svn path=/head/; revision=295463
* EHCI: Correct address of EHCI_USBMODE_LPM register is 0xC8, not 0xA8.Michal Meloun2016-01-301-1/+1
| | | | Notes: svn path=/head/; revision=295067
* EHCI: Make core reset and port speed reading more generic.Michal Meloun2016-01-285-40/+107
| | | | | | | | | | | | | | | | | | | | Use driver settable callbacks for handling of: - core post reset - reading actual port speed Typically, OTG enabled EHCI cores wants setting of USBMODE register, but this register is not defined in EHCI specification and different cores can have it on different offset. Also, for cores with TT extension, actual port speed must be determinable. But again, EHCI specification not covers this so this patch provides function for two most common variant of speed bits layout. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D5088 Notes: svn path=/head/; revision=294989
* Improve attachment of the ehci_mv driverZbigniew Bodek2016-01-201-14/+24
| | | | | | | | | | | | | | | Driver was modified to ensure it attaches properly to "marvell,orion-ehci" node, which doesn't have error interrupt line defined. Neccessary ofw_compat_data struct was added and probe procedure was altered. Reviewed by: andrew, ian Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4369 Notes: svn path=/head/; revision=294427
* Move ohci files to their proper place in the tree for atmel.Warner Losh2016-01-162-493/+0
| | | | | | | | | | Fix when it is included (we don't have a at91rm9200 device). From a similar patch in the PR, with tweaked names. PR: 206229 Notes: svn path=/head/; revision=294131
* Fix for directly connected FULL or LOW speed USB devices.Hans Petter Selasky2016-01-051-6/+21
| | | | | | | | Found by: Sebastian Huber <sebastian.huber@embedded-brains.de> MFC after: 1 week Notes: svn path=/head/; revision=293192
* Ads support to the xhci pci attachment to use MSI-X interrupts whenAndrew Turner2015-12-242-2/+30
| | | | | | | | | | | | | | | | | available. As with MSI interrupts these can be disabled by setting hw.usb.xhci.msix to 0 in the loader. MSI-X interrupts are needed on some hardware, for example the Cavium ThunderX only supports them, and with this we don't fall back to polling. PR: 204378 Reviewed by: hselasky, jhb MFC after: 1 week (after r292669) Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D4698 Notes: svn path=/head/; revision=292683
* Fix compile warning about shifting signed negative constant.Hans Petter Selasky2015-11-231-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=291199
* Avoid using the bounce buffer when the source or destination buffer isHans Petter Selasky2015-11-082-39/+143
| | | | | | | | | | | 32-bits aligned. Merge the two bounce buffers into a single one. Some rough tests showed that the DWC OTG throughput on RPI2 increased by 10% after this patch. MFC after: 1 week Notes: svn path=/head/; revision=290542
* Reduce the DWC OTG interrupt load by not reading all the host channelHans Petter Selasky2015-10-301-6/+11
| | | | | | | | | | | | status registers for every interrupt. Check a common host channel status interrupt register first, then conditionally read the individual host channel status registers. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> MFC after: 1 week Notes: svn path=/head/; revision=290195
* Add quirk for USB 3.0 PCI device.Hans Petter Selasky2015-10-191-0/+3
| | | | | | | | | Submitted by: philipp.maechler@mamo.li PR: 203650 MFC after: 1 week Notes: svn path=/head/; revision=289560
* Add support for Fresco Logic USB 3.0 host controller.Kevin Lo2015-10-081-6/+11
| | | | | | | | | | Fresco Logic hosts advertise MSI, but fail to actually generate MSI interrupts. We have to disable MSI use. Reviewed by: hselasky Notes: svn path=/head/; revision=289030
* Add quirk for USB 3.0 PCI device.Hans Petter Selasky2015-10-081-0/+1
| | | | | | | | Submitted by: Gary Jennejohn <gj@freebsd.org> MFC after: 1 week Notes: svn path=/head/; revision=289029
* Add Cavium ThunderX xHCI controller PCI IDEd Maste2015-09-151-0/+3
| | | | | | | | | | | | There is an issue with interrupts at the moment, but it works with polling mode set (hw.usb.xhci.use_polling=1). Reviewed by: hselasky Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3665 Notes: svn path=/head/; revision=287825
* Correct PCI ID.Hans Petter Selasky2015-09-141-1/+1
| | | | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 1 month PR: 202807 Notes: svn path=/head/; revision=287772
* Add support for the dwc usb in the HiSilicon hi6220 in the HiKey board. ForAndrew Turner2015-09-011-0/+97
| | | | | | | | | | | this we need to force the driver into host mode, as without this the driver fails to detect any devices. Relnotes: yes Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=287373
* Add new PCI ID.Hans Petter Selasky2015-09-011-0/+7
| | | | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 1 month PR: 202807 Notes: svn path=/head/; revision=287355
* Fixes for HIGH speed ISOCHRONOUS traffic. HS ISOCHRONOUS traffic atHans Petter Selasky2015-08-152-216/+236
| | | | | | | | | | | | intervals less than 250us was not handled properly. Add support for high-bandwidth ISOCHRONOUS packets. USB webcams, USB audio and USB DVB devices are expected to work better. High-bandwidth INTERRUPT endpoints is not yet supported. MFC after: 2 weeks Notes: svn path=/head/; revision=286802
* Handle NYET high speed tokens and predict NAK'ing is up next.Hans Petter Selasky2015-08-141-7/+13
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=286780