Learning About USB


The engineers first found USB Complete by Jan Axelson,1 which claims to tell "everything you need to develop custom USB peripherals." The first half of this book explains USB, data transfers, and device identification (called enumeration). The second half addresses device hardware design using chipsets. The book content isn't an exact match for developing Linux USB device drivers, but it provides a great introduction to USB communications. Here's what the engineers learned:

  • The USB bus is asynchronous serial, with differential signaling.

  • USB is plug-and-play; the user doesn't configure memory addresses, I/O addresses, interrupts or direct memory access (DMA).

  • USB v1.1 supports a 12Mbps data rate.

  • USB v2.0, which is relatively new, supports a 480Mbps data rate.

  • The USB bus supports up to 127 devices, using a tiered topology of hubs and devices.

  • USB devices are self-describing.

  • USB supports four transfer modes that address the bandwidth requirements of different devices:

    • Interrupt transfers support periodic bandwidth.

    • Isochronous transfers support guaranteed bandwidth.

    • Control transfers support guaranteed bus access.

    • Bulk transfers support low-priority large data transfer.

  • The USB controllers prioritize communications by using the four transfer modes to optimize bus communications.

  • In addition to providing electrical and communication protocol specifications, USB defines a number of device classes for common peripherals such as audio devices, modems, mouse devices, keyboards, printers, and mass storage devices. A peripheral device that implements a device class can utilize preexisting host device driver code. Device classes promote interoperability.

  • Many USB peripheral devices don't fit into a defined device class, such as scanners, video devices, Ethernet devices, MP3 players, and serial/parallel converters. Manufacturers of these devices must develop host device driver code.

  • USB host controllers fall into two categories: universal host controller interface (UHCI) and open host controller interface (OHCI). These controllers are functionally different from one another; a UHCI controller is simpler from a hardware perspective and shifts some communication processing to the host CPU and driver, thus complicating the driver. A variety of vendors offer UHCI and OHCI host controllers.

The engineers continued their USB research and found the Linux USB Project home page (www.linux-usb.org) and The Programming Guide for Linux USB Device Drivers.2 Browsing through this guide, they discovered the complexities of Linux USB device drivers. The first half of "USB Complete" clearly establishes that USB communications is not simple. "The Linux USB Programming Guide" further confirms this. The engineers decided that Project Trailblazer would not develop any USB device driver code because the steep learning curve would affect the development schedule.

The Linux USB Project home page offers a wealth of USB information. Linux USB device support started in 1996 as the Universal USB Driver (UUSBD). In 1999, Linus Torvalds developed the Alternate USB driver, which was released under the GPL license. As with other Linux code, a group of developers and testers fixed and enhanced the Alternate USB driver. Later that year, a complete driver code rewrite improved the interface and performance. The USB driver code matured and is incorporated into the kernel version 2.4.x configuration process and has been back-ported to kernel version 2.2.18. Drivers for device classes (audio devices, modems, mouse devices, keyboards, and mass storage devices) as well as numerous vendor-specific drivers (scanners, video devices, Ethernet devices, MP3 players, and serial/parallel converters) have been developed. Several vendor-specific drivers are incorporated into the kernel compile process, and the other drivers are compiled separately as loadable modules.

The Project Trailblazer engineers continued learning by reading "The Linux USB Sub-system."3 This early draft offers an excellent introduction and usage guide for USB at kernel revision 2.4.0-test9. While the engineers were researching USB for Linux, kernel version 2.4.10 was released. They understood that USB driver development continually evolves. This led them to the Linux-USB Device Overview Web site,4 which acts as a repository for current Linux USB driver information and organizes drivers into these categories: audio, communication, human interface devices, hub, image, keyboard, mass storage, mouse, multifunctional, networking, printer, scanner, serial, vendor, and video. The site offers device and driver overviews, a searchable index, and the ability to add and edit device information. This USB information clearinghouse enabled the engineers to select hardware that had operational Linux USB drivers.


    Embedded LinuxR. Hardware, Software, and Interfacing
    Embedded LinuxR. Hardware, Software, and Interfacing
    ISBN: N/A
    EAN: N/A
    Year: 2001
    Pages: 103

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net