uftdi driver - new ioctls to support FTDI bitbang and other modes

Ian Lepore ian at FreeBSD.org
Wed Apr 2 02:53:58 UTC 2014


The attached patch, which I hope to commit sometime soon, adds support
for bitbang, MPSSE, CPU_FIFO, and other modes supported by the FTDI
serial adapter chips, using ioctl() calls.  This allows full control of
all the FTDI features that embedded folks like, using any language that
supports fd-based IO.  You can, for example, program an fpga in MPSSE
mode just by configuring the mode with a couple ioctl() calls, then
writing the bitfile image to the fd as if it were going out a serial
port.  You can also do jtag work this way.

In addition to adding the new ioctls, this change removes all the code
that reset the chip at attach and open/close time, and also the code
that turned on RTS/CTS flow control on open without any permission to do
so (that was just always a bug in the driver).  

When FTDI chips are configured as GPIO or MPSSE or other special-purpose
uses by an attached serial eeprom, the chip will power on with certain
pins driven or floating, and it's important that the driver not do
anything to the chip to perturb that unless it receives a specific
command to do so.  When used for "plain old serial comms" the chip
powers on into the right mode and never needs to be reset while it's
running to operate properly, so this change is transparent to most
users.

-- Ian


-------------- next part --------------
A non-text attachment was scrubbed...
Name: uftdi_ioctl.diff
Type: text/x-patch
Size: 13002 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20140401/84c22cb0/attachment.bin>


More information about the freebsd-usb mailing list