aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller
Commit message (Collapse)AuthorAgeFilesLines
* xhci pci: Add some amd xhci controller device idsTom Jones2025-07-141-0/+7
| | | | | | Reviewed by: aokblast Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51259
* dwc_otg_fdt: do not create and leak extra usbus childAndriy Gapon2025-05-191-4/+0
| | | | | | | | dwc_otg_init() already takes care of creating the bus and setting up sc to point to it. Fixes: 518da7ace813e MFC after: 1 week
* usb: Use bus_detach_children instead of bus_generic_detachJohn Baldwin2025-03-121-1/+1
| | | | | | | | | The USB bus performs additional teardown steps in between detaching child devices and deleting child devices. Reported by: phk, thj Tested by: phk Fixes: e9d3857040a1 ("Use bus_detach_children instead of bus_generic_detach")
* usb: Kill left-over cdefs.h includesWarner Losh2025-03-0417-18/+0
| | | | | | | | | These includes were for __FBSD_RCSID() macro. They weren't formatted like the rest of the tree so weren't trimmed automatically when that script was run. Trim them now. MFC After: 1 week Sponsored by: Netflix
* riscv: enable Allwinner D1 USB driversMitchell Horne2025-01-101-2/+3
| | | | | | | | | | | Add the generic USB drivers and FDT glue to the build. Make small tweaks to the aw_usbphy and aw_musb drivers for the Allwinner D1. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48126
* Use bus_generic_detach instead of device_delete_children in detachJohn Baldwin2025-01-0214-36/+49
| | | | | | | While here, check for errors from bus_generic_detach and move it to the start of detach if necessary. Differential Revision: https://reviews.freebsd.org/D47969
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-063-3/+6
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* usb: change LIST to SLIST to avoid LinuxKPI conflictsBjoern A. Zeeb2024-09-241-3/+3
| | | | | | | | | | | | | In order to better integrate modern LinuxKPI USB this tries to reduce a contention point of "LIST". Given there is no need to use a LIST here change it to SLIST to avoid conflicts. It is a workaround which does not solve the actual problem (overlapping namespaces) but it helps us a lot for now. Sponsored by: The FreeBSD Foundation X-MFC? unclear Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46534
* newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYWarner Losh2024-07-2515-15/+15
| | | | Sponsored by: Netflix
* Add some AMD device IDs.Dmitry Luhtionov2024-06-071-0/+3
|
* kern: Remove leftover saf1761otg bitsJoshua Kinard2024-06-031-1/+0
| | | | | | | | | | | | Almost all code related to the saf1761 driver was removed in commit 44796b7e822e, except for two small bits related to saf1761otg support. This patch completes the removal. PR: 279302 Signed-off-by: Joshua Kinard <freebsd@kumba.dev> Reviewed by: mhorne MFC after: 3 days Fixes: 44796b7e822e ("mips: remove saf1761")
* bcm2838_xhci: add moduleLexi Winter2024-04-101-0/+2
| | | | | | | | | | | | | | | | | | | | | bcm2838_xhci(4) is a shim for the XHCI controller on the Raspberry Pi 4B SoC. It loads the controller's firmware before passing control to the normal xhci(4) driver. When xhci(4) is built as a module (and not in the kernel), bcm2838_xhci is not built at all and the RPi4's XHCI controller won't attach due to missing firmware. To fix this, build a new module, bcm2838_xhci.ko, which depends on xhci.ko. For the dependency to work correctly, also modify xhci to provide the 'xhci' module in addition to the 'xhci_pci' module it already provided. Since bcm2838_xhci is specific to a quirk of the RPi4 SoC, only build the module for AArch64. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1142
* syscon: Move syscon code in dev/sysconEmmanuel Vadot2024-01-102-2/+2
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43196
* phy: Move phy code in dev/phyEmmanuel Vadot2024-01-109-12/+12
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: emaste, imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43195
* regulator: Move regulator code in dev/regulatorEmmanuel Vadot2024-01-101-1/+1
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: emaste, imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43194
* hwreset: Move reset code in dev/hwresetEmmanuel Vadot2024-01-106-6/+6
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43192
* clk: Move clock code in dev/clkEmmanuel Vadot2024-01-108-8/+8
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43191
* usb: dwc3: Move driver under a subdirectoryEmmanuel Vadot2024-01-104-3/+341
| | | | | | | | | dwc3 is big enough to have its own subdirectory. While here only make it depend on kernel option dwc3 and rk_dwc3 without any SOC options. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43190
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-275-5/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Add some Intel ICH10 PCI IDs.Dmitry Luhtionov2023-10-302-0/+16
|
* arm64: xilinx: dwc3: Fix reset namesEmmanuel Vadot2023-08-231-2/+2
| | | | | | | Use the correct resets and not the same one three times in a row. Reported by: rpokala Sponsored by: Beckhoff Automation GmbH & Co. KG
* arm64: xilinx: Add glue driver for usb3 controllerEmmanuel Vadot2023-08-231-0/+149
| | | | | | | Like other dwc3 controller, on Xilinx ZynqMP the base node is just here to provide resets, the main dwc3 controller node is a child node. Sponsored by: Beckhoff Automation GmbH & Co. KG
* xhci: Add support for 64-bit DMA in generic XHCI controller driverStephen J. Kiernan2023-08-203-6/+24
| | | | | | | | | The XHCI controller on 64-bit SoCs need to use 64-bit DMA. Add a quirk to tell the generic XHCI driver that 32-bit DMA needs to be used, if there are any that may need to use 32-bit DMA only. Reviewed by: andrew Obtained from: Juniper Networks, Inc.
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-1621-42/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-1625-25/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-165-10/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* xhci(4): Describe AMD 400 Series USB 3.1 controllersMarius Strobl2023-07-231-1/+3
| | | | | | | While at it, correct the string for 300 series ones, these also are already xHCI 3.1. Fixes: d171d2f2 Add AHCI/XHCI device IDs found on AMD Ryzen+B350 system
* spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSDWarner Losh2023-05-125-5/+5
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-1235-35/+35
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* xhci(4): Describe Fresco Logic FL1009 USB 3.0 controllerZhenlei Huang2023-03-201-0/+2
| | | | | | Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38922
* uhci(4): Correct PCI device ID for Zhaoxin USB controllerZhenlei Huang2023-03-171-6/+6
| | | | | | | | And minor style fixes. Tested by: Weitao Wang <WeitaoWang-oc@zhaoxin.com> Fixes: 986c7be472bd uhci(4): Add new USB IDs Differential Revision: https://reviews.freebsd.org/D38924
* ehci(4): Correct PCI device ID for Zhaoxin USB 2.0 controllerZhenlei Huang2023-03-171-6/+6
| | | | | | | | And minor style fixes. Tested by: Weitao Wang <WeitaoWang-oc@zhaoxin.com> Fixes: f9237e1937a4 ehci(4): Add new USB IDs Differential Revision: https://reviews.freebsd.org/D38923
* xhci(4): Correct PCI device IDs for Zhaoxin USB 3.0 controllersZhenlei Huang2023-03-171-10/+10
| | | | | | | | | And minor style fixes. Reviewed by: hselasky Tested by: Weitao Wang <WeitaoWang-oc@zhaoxin.com> Fixes: 0d7064d58f89 xhci(4): Add new USB IDs Differential Revision: https://reviews.freebsd.org/D38921
* usb: dwc3: add <sys/mutex.h>Joerg Wunsch2023-03-081-0/+1
| | | | | Commit 5e54bb1ea9e90 added USB_BUS_LOCK/USB_BUS_UNLOCK. They, in consequence, require mutexes so <sys/mutex.h> is needed.
* usb: dwc3: implement hw.usb.xhci.use_pollingKyle Evans2023-02-281-6/+28
| | | | | | | | | | Polling is currently only implemented in the xhci pci attachment. Adding it to dwc3 doesn't make it much uglier, and supporting it can be useful for confirming that hardware's otherwise functional when interrupts are apparently not firing. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D38816
* usb: purge EOL release compatibilityElliott Mitchell2023-02-043-15/+0
| | | | | | | | Remove conditionsals for FreeBSD 6, 7, 8 and 9 compatibility. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560
* xhci(4): Add new USB IDs.Dmitry Luhtionov2023-01-171-0/+11
| | | | | MFC after: 1 week Sponsored by: NVIDIA Networking
* ehci(4): Add new USB IDs.Dmitry Luhtionov2023-01-171-0/+8
| | | | | MFC after: 1 week Sponsored by: NVIDIA Networking
* uhci(4): Add new USB IDs.Dmitry Luhtionov2023-01-171-0/+8
| | | | | MFC after: 1 week Sponsored by: NVIDIA Networking
* xhci(4): Make sure allocated bandwidth is freed in hardware by unconfiguring ↵Cheng, Huiming2023-01-131-0/+40
| | | | | | | endpoint. MFC after: 1 week Sponsored by: NVIDIA Networking
* copyright: chase my name and email changeVal Packett2023-01-061-1/+1
| | | | | Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37945
* Check for more XHCI ACPI IDsAndrew Turner2023-01-041-4/+7
| | | | | | | | | | | The Windows Dev Kit 2023 uses the XHCI-compliant USB controller without standard debug ID in its ACPI tables. Check for both ID values found on [1] in the XHCI ACPI attachment. [1] https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/device-management-namespace-objects Tested by: Robert Clausecker <fuz@fuz.su> Sponsored by: Arm Ltd
* Get clocks for Rockchip RK3568.Søren Schmidt2022-12-201-1/+2
|
* usb/dwc3: Use more () for macros variablesEmmanuel Vadot2022-11-161-2/+2
| | | | | Suggested by: andrew Sponsored by: Beckhoff Automation GmbH & Co. KG
* usb/dwc3: Only force USB2 based on the PHY register and IP versionEmmanuel Vadot2022-11-162-6/+18
| | | | | | | | | | | | We shouldn't force USB2 only based on if we have an external PHY. The internal PHY register tell us what link speed we can acheive and we need to force USB2 only if it cannot do USB3. This is only available after revision 0x290A of the dwc3 IP. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D37394 Fixed: 1331c0f44b6a ("Add support for RockChip RK356X to DWC3 driver.") Sponsored by: Beckhoff Automation GmbH & Co. KG
* usb/dwc3: Read the full IDs/versionEmmanuel Vadot2022-11-162-2/+40
| | | | | | | | We need to enable some quirks based on the version so read it. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D37393 Sponsored by: Beckhoff Automation GmbH & Co. KG
* dwc3: Handle optional clocksEmmanuel Vadot2022-11-161-1/+39
| | | | | | | | | | | | | Usually dwc3 needs a glue node that contain the SoC specific clocks/resets. For some reason the RK3328 DTS doesn't have this glue node and the clocks are specified in the dwc3 node directly. The bindings says that it is allowed but doesn't specified some strict names for them. Add a specific case for RK3328 based on the compatible string. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D37392 Sponsored by: Beckhoff Automation GmbH & Co. KG
* xhci(4): Don't allocate an IRQ vector if hw.usb.xhci.use_polling=1 is set.Hans Petter Selasky2022-10-201-1/+1
| | | | | | | This is useful for debugging purposes. MFC after: 1 week Sponsored by: NVIDIA Networking
* Add random VMware device IDs.Alexander Motin2022-10-203-0/+20
| | | | | | Just to make dmesg look nicer there. MFC after: 1 week