summaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller
Commit message (Collapse)AuthorAgeFilesLines
* usb: Kill left-over cdefs.h includesWarner Losh2025-03-1117-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 (cherry picked from commit ca48e43ba9ee73a07cdbad8365117793b01273bb)
* Add some AMD device IDs.Dmitry Luhtionov2024-09-251-0/+3
| | | | (cherry picked from commit 4cc4b5e2b5f85f136169069559108ed7fff351f9)
* kern: Remove leftover saf1761otg bitsJoshua Kinard2024-06-061-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") (cherry picked from commit 80828c6fab0292b5c5a34a63558d837cb9308fbd)
* 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
* usb(4): Substitute "unsigned int" using the equivalent and shorter ↵Hans Petter Selasky2022-10-072-5/+5
| | | | | | | "unsigned" keyword. MFC after: 1 week Sponsored by: NVIDIA Networking
* usb(4): Make the enumeration thread nice time a variable.Hans Petter Selasky2022-10-071-1/+1
| | | | | | | | Depends on "options USB_DEBUG". Suggested by: koobs@ MFC after: 1 week Sponsored by: NVIDIA Networking
* usb(4): Make sure the enumeration thread doesn't loop too fast.Hans Petter Selasky2022-10-051-0/+3
| | | | | MFC after: 1 week Sponsored by: NVIDIA Networking
* usb: musb_otg_allwinner: de-constify bus_space_tagsMitchell Horne2022-09-271-8/+9
| | | | | | | | | | | | | The SAN interceptors simply take a bus_space_tag_t, so we're dropping qualifiers here. const semantics with a ptr typedef mean we'd have to drop or change the bus_space_tag_t abstraction used in the SAN sanitizers in order to make a compatible change there, which likely isn't worth it. Reviewed by: andrew, markj Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D36764
* Add support for RockChip RK356X to DWC3 driver.Søren Schmidt2022-08-162-1/+9
| | | | | | | | For RK356x platform, we can set bit 26 of DWC3_GUCTL1 register for usb 2.0 device. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D36211
* XHCI: remove a self-assignmentBjoern A. Zeeb2022-08-071-1/+0
| | | | | | | x = x is an unneeded operation, remove it. The value is read and assigned above for real. MFC after: 4 weeks
* dwc3: add ACPI attachmentBjoern A. Zeeb2022-07-061-51/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | Split the current FDT-only implementation up into an FDT and an ACPI part reusing and sharing as much code as possible (thanks mw!). This makes the Synopsis XHCI root hubs attach correctly on SolidRun's HoenyComb instead of just the generic XHCI root and this means we are also doing proper chip setup and applying the quirk needed there [1]. There is one problem with ACPI attachment in that it uses the generic XHCI PNP ID. So we need to do extra checks in order to not claim all xhci, which means we check for a known quirk to be present in acpi_probe. Long term this isn't scaling and this was discussed in SolidRun's Discord Channel in 2021 with the intend that "jnettlet" will take this to a steering committee. Since then ACPI has kind-of become a technology non grata (due to not getting changes into Linux timely) so it is unclear if this will ever happen. If there will be further hardware with dwc3/ACPI we should go and make sure this problem gets solved. [1] https://github.com/SolidRun/edk2-platforms/blob/24698f90b79facfbbfc4067b39a4ddf8c7fdfa88/Silicon/NXP/LX2160A/AcpiTables/Dsdt/Usb.asl Reviewed by: manu, mw MFC after: 10 days Differential Revision: https://reviews.freebsd.org/D32256
* dwc3: fix from not workingBjoern A. Zeeb2022-07-051-1/+2
| | | | | | | | | | | | | | During the review of 09cdf4878c621be4cd229fa88cdccdcdc8c101f7 we switched from cached registers to reading them as needed. One read of the two reads was moved after the softreset got triggered and as a result returned 0 rather than the proper register value. Moving the read before the softreset gets initiated seems to make things work again and xhci.c no longer complains about "Controller does not support 4K page size.". MFC after: 10 days X-MFC with: 09cdf4878c621be4cd229fa88cdccdcdc8c101f7 Pointy hat to: bz
* dwc3: improve debuggingBjoern A. Zeeb2022-07-031-9/+24
| | | | | | | | | | | | | | | | Rather than hiding behind #if 0, hide the debugging behind DWC3_DEBUG so it can be turned on with a single define. Require bootverbose to print anything so we can still avoid spamming the console if DWC3_DEBUG is on. Harmonize the format string in snsp_dwc3_dump_regs() to always print the full register and also print the XHCI quirks. Call snsp_dwc3_dump_regs() twice, before and after generic XHCI attachment and initialisation as this may have an effect on the confirgumation state. Obtained from: an old debug patch MFC after: 2 weeks Reviewed by: mw Differential Revision: https://reviews.freebsd.org/D35700
* dwc3: add more quirks and checksBjoern A. Zeeb2022-07-032-4/+53
| | | | | | | | | | | | | | | | | | Rather than just printing the Global SNPS ID Register store it as well so we can do a version check later. In addition, for debugging purposes, read the Global Hardware Parameters Registers and print them. Based on the snpsid disable an XHCI feature using a quirk prepared in 447c418da03454a2a00bc115a69c62055a6d5272. Add the "snps,dis_u3_susphy_quirk" quirk and handle Suspend USB3.0 SS PHY after power-on-reset/during core initialization (suggested to be cleared) based on the DWC3_GHWPARAMS0 register. MFC after: 2 weeks Obtained from: an old debugging patch Reviewed by: mw (earlier version), mmel Differential Revision: https://reviews.freebsd.org/D35699
* dwc3: uncondinationally enable Host IN Auto RetryBjoern A. Zeeb2022-07-032-0/+10
| | | | | | | | | | | | Enable dwc3's auto retry feature. For IN transfers with crc errors or internal overruns this will make the host reply with a non-terminating retry ACK. I believe the hope was to improve reliability after seeing occasional hiccups. Obtained from: an old debugging patch MFC after: 2 weeks Reviewed by: mw Differential Revision: https://reviews.freebsd.org/D35698
* dwc3: fix snps,dis-del-phy-power-chg-quirkBjoern A. Zeeb2022-07-031-1/+1
| | | | | | | | | If snps,dis-del-phy-power-chg-quirk is set, the register bit should be cleared not ored on (it's the "dis" version). MFC after: 2 weeks Reviewed by: mw Differential Revision: https://reviews.freebsd.org/D35697
* USB: dwc3: use device_{has,get}_property()Bjoern A. Zeeb2022-06-281-15/+19
| | | | | | | | | | | | Switch the driver to use device based functions which will work not only with FDT but also ACPI. While here make dr_mode a local variable as it is only used during probe and not needed later in the softc. MFC after: 2 weeks Reviewed by: mw Differential Revision: https://reviews.freebsd.org/D33170
* USB: add quirks to XHCIBjoern A. Zeeb2022-06-152-1/+9
| | | | | | | | | | | | | While XHCI is very generic some revisions of chipsets have problems. On dwc3 <= 3.00a Port Disable does not seem to work so we need to not enable it. For that introduce quirks to xhci so that controllers can steer certain features. I would hope that this is and remains the only one. Obtained from: an old patch mainly debugging other problems MFC after: 2 weeks Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D35482
* usb: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-0620-72/+29
|
* xhci(4): Tweak USB port speed checks to allow newer super speed generations.Hans Petter Selasky2022-05-041-2/+2
| | | | | | | This allows setting the U1 and U2 port timeout values. MFC after: 1 week Sponsored by: NVIDIA Networking
* xhci(4): Properly define all basic USB port speeds.Hans Petter Selasky2022-05-042-4/+8
| | | | | MFC after: 1 week Sponsored by: NVIDIA Networking