EZ-USB on Linux

A company called AnchorChips (now owned by Cypress) came out with an innovative and useful product a while ago: an enhanced 8051 (8 bit CPU) based microcontroller that has direct hardware support to run USB 1.1 devices. That product, updated, is known as the EZ USB FX. It can support all USB endpoints (30 plus control).

When USB 2.0 came out, this product was updated to support its much faster speeds (480 MBit/sec), calling that product the EZ USB FX2. The FX2 doesn't support quite as many endpoints (six plus control), but it does handle multibuffered high speed transfers in hardware. Device firmware just processes interrupts, fills buffers, and tells the hardware to do its thing.

There are a fair number of projects that work with both EZ-USB devices and with Linux (on the host side). This web page is designed as a community resource, with (cross)links to related projects as well as hosting some Linux-focused efforts directly

From a system perspective, an EZ-USB device with its firmware are comparable to a Linux system with an implementation of the USB Gadget API (a standard part of Linux 2.5) and some gadget driver using that. The Linux system will typically be much more powerful, since it has at least a 32-bit processor and richer software environment. However, the EZ-USB device will be a fraction of its cost.

Linux-Centric EZ-USB Projects

USB devices typically have to work with many operating systems. Their Linux support builds on the common kernel and user mode USB infrastructure, which you can read about elsewhere on this site.

Firmware loader: fxload

Devices without EEPROMs are less expensive, so many devices don't have them. That means computers need to download firmware to such devices before they're used. Kernel device drivers can do the downloads, but then the firmware just locks down kernel memory. Plus, it's easier to distribute updated firmware if you don't need to upgrade a kernel driver to do that. So many EZ-USB products download firmware from application code.

The Linux-Hotplug project hosts fxload software which is used to upload firmware into EZ-USB devices.

For more information, see the end of the Linux-Hotplug page about USB, where Downloading Firmware with fxload is discussed. This supports all three versions of EZ-USB chips, including high speed USB 2.0 on Linux 2.4.19 and 2.5.* kernels.

EZ-USB Midi Project

The goal of the EZ-USB Midi project is to make a USB-MIDI compliant, GPLv2 licensed firmware (in C) for the original EZ-USB chip (AN2131SC). It was started to makes MidiSport1x1 and MidiSport2x2 USB-MIDI adapters run with Linux. These devices let you connect MIDI devices (such as controllers or synthesizers) to Linux, using USB instead of the older soundcard hookups. Contact lars.doelle@on-line.de for more information.

Some relevant links:

USB Testing Firmware

Martin Diehl has provided EZ-USB firmware implementing simple device protocols that are very useful when used with usbtest software from Linux-USB hosts, to help verify correct operation of the host and isolate bugs. Firmware source is available.

EZ-HID Project

There's a project working on HID firmware: http://ezhid.sourceforge.net Many links to follow at that site.


Earlier in the development of the Linux USB stack, EZ-USB devices were handy to make sure that the USB Host Controller Drivers ("HCDs", especially UHCI) were working right.

The usbstress software (http://usb.in.tum.de/download) uses EZ-USB devices, some custom firmware, and a user mode driver built over the USB file system (usbfs). You could run simple tests that transferred control, bulk, or isochronous traffic. This software is still usable on 2.4 kernels, though it needs some tweaking if you're just trying to use it with some EZ-USB based product rather than in some kind of developer kit.

USB Serial Drivers

Since 8051 microcontrollers easily handle RS-232 I/O, it's no surprise that a lot of USB serial adapters basically package an 8051 and RS-232 connectors with firmware. When supported directly by the Linux kernel, these devices appear just like any other kind of serial port. A number of them need to download firmware before they are usable. At this writing, all that firmware is statically linked into the appropriate mini-driver.

EZ-USB Technical References

Before you start to work with either USB or the EZ-USB controllers, you'll need to know a lot of the information found at these sites.