aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/usb
Commit message (Collapse)AuthorAgeFilesLines
* udbc: Add usb debug host mode driverTom Jones2025-09-152-4/+12
| | | | | | | | | | | | | | | xhci offers a debugging interface which uses a special usb 3 cable with the D+, D- and VBUS pairs disconnected. This interface allows a target device to configure its xhci controller as a debugging channel which can then be used to provide a serial link between the target and a debug host. This change extracts the udbc host mode driver from hrs@'s xhci debug implementation. Reviewed by: bcr (man page) MFC after: Before 15-ALPHA3 builds Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51299
* sys/modules: fix standalone build for multiple modulesShengYi Hung2025-08-232-2/+2
| | | | | | | | | Multiple Makefile miss opt_*.h and *_if.h header file. We fix it by running make in sys/modules to build all modules. Approved by: lwhsu (mentor), markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52062
* mtw(4) remove misplaced DEBUG_FLAGSJesper Schmitz Mouridsen2025-02-071-1/+1
| | | | | | PR: 284639 Approved by: markj,emaste Differential Revision: https://reviews.freebsd.org/D48895
* mt7601U: Importing if_mtw from OpenBSDJesper Schmitz Mouridsen2025-02-032-1/+10
| | | | | | | | | Added ht20 mode, based on if_run from FreeBSD, and if_mtw.c from OpenBSD. PR: 247545 Approved by: adrian, wireless Differential Revision: https://reviews.freebsd.org/D45179
* umb: Introduce the USB umb(4) network driverAdrian Chadd2025-01-202-1/+34
| | | | | | | | | | | | | | | | | | | | | | | This includes the port of a driver originally from OpenBSD, later ported to NetBSD by the author: * The umb(4) kernel driver * The umbctl(8) companion tool This driver supports USB network devices implementing the Mobile Broadband Interface Model (MBIM), often found in modern (internal) USB models for 4G/LTE mobile broadband access. It is currently limited to IPv4. umbctl has to be used to display or set MBIM cellular modem interface parameters (4G/LTE). Differential Revision: https://reviews.freebsd.org/D48167 Approved by: adrian, zlei Sponsored by: FreeBSD Foundation PR: kern/263783 Submitted by: Pierre Pronchery <khorben@defora.org>
* Remove residual blank line at start of MakefileWarner Losh2024-07-1516-16/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Add support for i2c-tiny-usb: usb to iic bridgeDenis Bodor2024-04-192-0/+36
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1123
* bcm2838_xhci: Need to generate ofw_bus_if.hWarner Losh2024-04-121-1/+1
| | | | | | | | Add ofw_bus_if.h to SRCS so that this will always be generated so this can build standalone, or when FDT isn't in the kernel. Fixes: ac83063d37e5e92ad048cc4ed958654c02103f74 (for LINT-ACPI) Sponsored by: Netflix
* bcm2838_xhci: add moduleLexi Winter2024-04-102-1/+18
| | | | | | | | | | | | | | | | | | | | | 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
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-1686-87/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* mii: Add opt_platform.h to all miibus driversWarner Losh2022-04-0514-14/+14
| | | | | | | | | miivar.h includes opt_platform.h. Make sure all the drivers that use the miibus_if.h interface file have opt_platform.h as well. While some of these may not, strictly speaking, need it, it's easier to include it universally for miibus. Sponsored by: Netflix
* mips: remove saf1761Warner Losh2022-01-042-50/+1
| | | | | | | | The saf1761 OTG support was only for mips targets (BERI?). Retire it. Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D33706
* Fix some modules to export more used symbolsKonstantin Belousov2021-11-184-0/+8
| | | | | | | | | and remove non-present symbols that are now reported by kmod_syms.awk. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32878
* wsp(4): Add evdev support.Vladimir Kondratyev2021-08-241-2/+2
| | | | | | | | Reviewed by: hselasky Tested by: Greg V, Constantin Furst<constantin_AT_fuersten_DOT_info> MFC after: 2 weeks PR: 252236 Differential revision: https://reviews.freebsd.org/D31653
* hidraw(4): Add HIDRAW_MAKE_UHID_ALIAS kernel optionVladimir Kondratyev2021-01-071-2/+2
| | | | | | | | | | which installs /dev/uhid# alias to hidraw character device for compatibility with some existing uhid(4) users like Firefox. As side effect it renames traditional uhid(4) driver to hidraw to make possible using of common unit number allocator. Requested by: Greg V <greg_unrelenting.technology> Reviewed by: hselasky (as part of D27992)
* hid: Import usbhid - USB transport backend for HID subsystem.Vladimir Kondratyev2021-01-072-1/+12
| | | | | | | | | | | | | | | | This change implements hid_if.m methods for HID-over-USB protocol [1]. Also, this change adds USBHID_ENABLED kernel option which changes device_probe() priority and adds/removes PnP records to prefer usbhid over ums, ukbd, wmt and other USB HID device drivers and vice-versa. The module is based on uhid(4) driver. It is disabled by default for now due to conflicts with existing USB HID drivers. [1] https://www.usb.org/sites/default/files/hid1_11.pdf Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27893
* A major update to the ure driver.John-Mark Gurney2020-09-121-1/+1
| | | | | | | | | | | | | | | | | | | This update adds support for: HW VLAN tagging HW checksum offload for IPv4 and IPv6 tx and rx aggreegation (for full gige speeds) multiple transactions In my testing, I am able to get 900-950Mbps depending upon TCP or UDP, which is a significant improvement over the previous 91Mbps (~8kint/sec*1500bytes/packet*1packet/int). Reviewed by: hselasky MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D25809 Notes: svn path=/head/; revision=365648
* Remove the long obsolete ufm driver.Warner Losh2020-08-202-37/+1
| | | | | | | | | | | | | It was a driver for a USB FM tuner that was available in the market in 2002. I wrote the driver in 2003. I've not used it since 2005 or so, so it's time to retire this driver. No userland code ever interfaced to the special device it created. There's no user base: the last bug I received on this driver was in 2004. Relnotes: Yes Notes: svn path=/head/; revision=364432
* Unbreak building cp2112(8) as a module outside of kernel build environment.Eugene Grosbein2020-08-161-1/+1
| | | | Notes: svn path=/head/; revision=364269
* cp2112: driver for the namesake GPIO and I2C master gadgetAndriy Gapon2020-08-062-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | Documentation: - CP2112 Datasheet https://www.silabs.com/documents/public/data-sheets/cp2112-datasheet.pdf - AN495: CP2112 Interface Specification https://www.silabs.com/documents/public/application-notes/an495-cp2112-interface-specification.pdf - CP2112 Errata https://www.silabs.com/documents/public/errata/cp2112-errata.pdf The logic is implemented as three sub-drivers. The parent driver claims the USB device and creates two child devices. One acts as a GPIO controller and the other is an I2C controller. Tested with CP2112 revision F02. Both features seem to work. HTU21 sensor was used as an I2C slave. Reviewed by: adrian, hselasky MFC after: 2 weeks Relnotes: maybe Differential Revision: https://reviews.freebsd.org/D25359 Notes: svn path=/head/; revision=363951
* Fix build of stand/usb .Hans Petter Selasky2020-01-231-1/+6
| | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=357041
* Add cdceem(4) driver, for virtual ethernet devices compliantEdward Tomasz Napierala2019-08-073-2/+16
| | | | | | | | | | | | | | | | | with Communication Device Class Ethernet Emulation Model (CDC EEM). The driver supports both the device, and host side operation; there is a new USB template (#11) for the former. This enables communication with virtual USB NIC provided by iLO 5, as found in new HPE Proliant servers. Reviewed by: hselasky MFC after: 2 weeks Relnotes: yes Sponsored by: Hewlett Packard Enterprise Notes: svn path=/head/; revision=350685
* Put USB ACPI code into own module, uacpi.ko.Hans Petter Selasky2019-07-083-8/+43
| | | | | | | | | The code needs more testing before being enabled by default. Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=349851
* Add ACPI support for USB driver.Takanori Watanabe2019-06-171-0/+5
| | | | | | | | | | | | This adds ACPI device path on devinfo(8) output and show value of _UPC(usb port capabilities), _PLD (physical location of device) when hw.usb.debug >= 1 . Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D20630 Notes: svn path=/head/; revision=349161
* Stop using .OODATE for extracting firmware.Bryan Drewery2019-06-122-2/+2
| | | | | | | | | | | | | This fixes META_MODE rebuilding since it assumes that it this is a non-consistent build command. These are always unencoded consistently though and do not need to use the .OODATE/$? mechanism. MFC after: 2 weeks Reported by: npn Sponsored by: DellEMC Notes: svn path=/head/; revision=348979
* Add common support functions for USB devices configured via FDT data.Ian Lepore2019-05-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FDT data is sometimes used to configure usb devices which are hardwired into an embedded system. Because the devices are instantiated by the usb enumeration process rather than by ofwbus iterating through the fdt data, it is somewhat difficult for a usb driver to locate fdt data that belongs to it. In the past, various ad-hoc methods have been used, which can lead to errors such applying configuration that should apply only to a hardwired device onto a similar device attached by the user at runtime. For example, if the user adds an ethernet device that uses the same driver as the builtin ethernet, both devices might end up with the same MAC address. These changes add a new usb_fdt_get_node() helper function that a driver can use to locate FDT data that belongs to a single unique instance of the device. This function locates the proper FDT data using the mechanism detailed in the standard "usb-device.txt" binding document [1]. There is also a new usb_fdt_get_mac_addr() function, used to retrieve the mac address for a given device instance from the fdt data. It uses usb_fdt_get_node() to locate the right node in the FDT data, and attempts to obtain the mac-address or local-mac-address property (in that order, the same as linux does it). The existing if_smsc driver is modified to use the new functions, both as an example and for testing the new functions. Rpi and rpi2 boards use this driver and provide the mac address via the fdt data. [1] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/usb/usb-device.txt Differential Revision: https://reviews.freebsd.org/D20262 Notes: svn path=/head/; revision=347974
* uep(4): add evdev supportVladimir Kondratyev2018-08-051-2/+2
| | | | | | | | | | | | | | | | | To compile this driver with evdev support enabled, place following lines into the kernel configuration file: options EVDEV_SUPPORT device evdev Note: Native and evdev modes are mutually exclusive. Reviewed by: gonzo, wblock (docs) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D11156 Notes: svn path=/head/; revision=337348
* Remove Atmel AT91RM9200 and AT91SAM9 support.Warner Losh2018-07-272-44/+1
| | | | | | | | | | | | | | 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
* if_muge: connect module to the buildEd Maste2018-05-251-0/+1
| | | | | | | | | | | | | | | | Supported Microchip devices: - LAN7515 USB 2 hub and gigabit Ethernet controller w/ PHY - LAN7800 USB 3.0 gigabit Ethernet controller w/ PHY The LAN7515 is the Ethernet controller on the Raspberry Pi 3 B+. This driver has some TODO items outstanding, but basic functionality works. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=334212
* Add a "multifunction" device side USB template, which provides massEdward Tomasz Napierala2018-05-171-1/+2
| | | | | | | | | | | | | storage, CDC ACM (serial), and CDC ECM (ethernet) at the same time. It's quite similar in function to Linux' "g_multi" gadget. Reviewed by: hselasky@ MFC after: 2 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=333760
* Add driver for Microchip LAN78xx USB3-GigE controllerEd Maste2018-05-171-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver supports two Microchip USB-Ethernet controllers: LAN7800 USB 3.1 to 10/100/1000 Mbps Ethernet LAN7515 USB 2 to 10/100/1000 Mbps Ethernet with built-in USB hub The LAN7515 is the Ethernet controller on the Raspberry Pi 3B+. At present there is no datasheet for the LAN7515, but it is effectively a USB 2 hub combined with a LAN7800 controller. A comprehensive LAN7800 datasheet is at http://www.microchip.com/wwwproducts/en/LAN7800. This driver is based on the structure of the smsc(4) driver which supports Microchip/SMSC's LAN95xx family. (Microchip acquired SMSC in May 2012.) The Linux lan78xx driver served as a reference for some functionality and registers. The 'muge' driver name comes from "Microchip USB Gigabit Ethernet". I made some style adjustments and minor edits to Arshan's submission. It will be connected to the build after additional review and testing. Thanks to Microchip for providing a number of Evaluation Boards (EVBs) for development and testing. Submitted by: Arshan Khanifar Reviewed by: hselasky (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15168 Notes: svn path=/head/; revision=333713
* Add new USB HID driver for Super Nintendo gamepads.Hans Petter Selasky2018-05-152-1/+37
| | | | | | | | | Differential Revision: https://reviews.freebsd.org/D15385 Submitted by: johalun@gmail.com (Johannes Lundberg) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=333633
* Move most of the contents of opt_compat.h to opt_global.h.Brooks Davis2018-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options. Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures. Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files. Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941 Notes: svn path=/head/; revision=332122
* usb/wlan/*: properly include "opt_wlan.h" into all driversAndriy Voskoboinyk2018-03-107-11/+11
| | | | | | | | Without it driver cannot be loaded when wlan(4) module is built with 'options IEEE80211_DEBUG_REFCNT'. Notes: svn path=/head/; revision=330749
* Add support for generic MS Windows 7/8/10-compatible USB HID touchscreensVladimir Kondratyev2017-08-192-1/+11
| | | | | | | | | | | found in many laptops. Reviewed by: hps, gonzo, bcr (manpages) Approved by: gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D12017 Notes: svn path=/head/; revision=322695
* sys/modules: normalize .CURDIR-relative paths to SRCTOPEnji Cooper2017-03-0480-80/+80
| | | | | | | | | | | This simplifies make output/logic Tested with: `cd sys/modules; make ALL_MODULES=` on amd64 MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314651
* Add USB Mass Storage CTL frontend. This makes it possibleEdward Tomasz Napierala2017-02-192-1/+10
| | | | | | | | | | | | | | | | | | | | | | | for USB OTG-capable hardware to implement device side of USB Mass Storage, ie pretend it's a flash drive. It's configured in the same way as other CTL frontends, using ctladm(8) or ctld(8). Differently from usfs(4), all the configuration can be done without rebuilding the kernel. Testing and review is welcome. Right now I'm still moving, and I don't have access to my test environment, so I'm somewhat reluctant to making larger changes to this code; on the other hand I don't want to let it sit on Phab until my testing setup is back, because I want to get it into 11.1-RELEASE. Reviewed by: emaste (cursory), wblock (man page) MFC after: 2 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8787 Notes: svn path=/head/; revision=313959
* mips: exclude modules that fail to buildEd Maste2017-01-261-1/+4
| | | | Notes: svn path=/head/; revision=312821
* Add evdev support to ums(4)Oleksandr Tymoshenko2016-09-211-2/+2
| | | | | | | | | | | | | event generation is disabled by default in favour of sysmouse. This behavoiur is controlled by kern.evdev.rcpt_mask sysctl, bit 2 should be set to give priority to hw over sysmouse Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru> Reviewed by: hans Differential Revision: https://reviews.freebsd.org/D7863 Notes: svn path=/head/; revision=306134
* Add evdev support to ukbd driverOleksandr Tymoshenko2016-09-211-1/+1
| | | | | | | | | | | | | event generation is disabled by default in favour of kbdmux. This behavoiur is controlled by kern.evdev.rcpt_mask sysctl, bit 3 should be set to give priority to hw over mux Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru> Reviewed by: hans Differential Revision: https://reviews.freebsd.org/D7957 Notes: svn path=/head/; revision=306132
* [urtwn] migrate urtwn out into sys/dev/urtwn/ .Adrian Chadd2016-03-207-57/+0
| | | | | | | | | | | | | | | | | | | There's some upcoming work to add new chipset support here and I'd like to only add 802.11n support to one driver, instead of both urtwn and rtwn. There's also missing support for things like 802.11n, some powersave work, bluetooth integration/coexistence, etc, and also newer parts (like 8192EU, maybe some 11ac parts, not sure yet.) So, this is hopefully the first step in a longer set of steps to unify rtwn/urtwn and extend it with more interesting chipset and functionality support. Reviewed by: kevlo Notes: svn path=/head/; revision=297058
* urtwn: add an option to compile the driver without firmware specific codeAndriy Voskoboinyk2016-02-222-3/+9
| | | | | | | | | | | | | | | | | | | - Add URTWN_WITHOUT_UCODE option (will disable any firmware specific code when set). - Do not exclude the driver from build when MK_SOURCELESS_UCODE is set (URTWN_WITHOUT_UCODE will be enforced unconditionally). - Do not abort initialization when firmware cannot be loaded; behave like the URTWN_WITHOUT_UCODE option was set. - Drop some unused variables from urtwn_softc structure. Tested with RTL8188EU and RTL8188CUS in HOSTAP and STA modes. Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4849 Notes: svn path=/head/; revision=295871
* Disable the firwmare licence check for rsu and urtwn.Adrian Chadd2015-12-262-2/+2
| | | | | | | | | | | | | | | The licence grant says something exactly the same as the atheros patent grant, which is "As long as you use this firmware on our chips, everything is totally okay." Now, I'm pretty sure if that we /have/ to have this, we're going to have to have it for every other firmware for every other device in the tree. So, I'll flip this off in -HEAD for now so people stop asking about why rsu/urtwn don't work out of the box, and I'll kick off a larger discussion about this in the new year. Notes: svn path=/head/; revision=292756
* Add initial support for RTL8152 USB Fast Ethernet. RTL8152 supportsKevin Lo2015-12-012-1/+11
| | | | | | | | | | | | | IPv4/IPv6 checksum offloading and VLAN tag insertion/stripping. Since uether doesn't provide a way to announce driver specific offload capabilities to upper stack, checksum offloading support needs more work and will be done in the future. Special thanks to Hayes Wang from RealTek who gave input. Notes: svn path=/head/; revision=291557
* Build all of sys/modules with SUBDIR_PARALLEL.Bryan Drewery2015-11-101-5/+0
| | | | | | | | Sponsored by: EMC / Isilon Storage Division MFC after: 3 weeks Notes: svn path=/head/; revision=290665
* Finish process of moving the LinuxKPI module into the default kernel build.Hans Petter Selasky2015-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | - Move all files related to the LinuxKPI into sys/compat/linuxkpi and its subfolders. - Update sys/conf/files and some Makefiles to use new file locations. - Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn adds the LinuxKPI to all LINT builds. - The LinuxKPI can be added to the kernel by setting the COMPAT_LINUXKPI option. The OFED kernel option no longer builds the LinuxKPI into the kernel. This was done to keep the build rules for the LinuxKPI in sys/conf/files simple. - Extend the LinuxKPI module to include support for USB by moving the Linux USB compat from usb.ko to linuxkpi.ko. - Bump the FreeBSD_version. - A universe kernel build has been done. Reviewed by: np @ (cxgb and cxgbe related changes only) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=290135
* urtwn(4): split *reg and *var parts (no functional change).Adrian Chadd2015-10-121-1/+1
| | | | | | | | Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3775 Notes: svn path=/head/; revision=289167
* Add opt_wlan.h as requirements for the two drivers I'm currently working on.Adrian Chadd2015-09-292-2/+2
| | | | Notes: svn path=/head/; revision=288352
* Add USB gold driver to default kernel build.Hans Petter Selasky2015-06-191-1/+1
| | | | Notes: svn path=/head/; revision=284592
* Import ugold driver from OpenBSD supporting digital USB temperatureHans Petter Selasky2015-06-111-0/+13
| | | | | | | | | | meters. The driver is currently not part of the default kernel build. Obtained from: OpenBSD MFC after: 2 weeks Notes: svn path=/head/; revision=284272