Forcing a USB device to "ugen"

Jason Thorpe <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
I have a device based on the FTDI FT2232C:

[ 11113285.311079] uftdi1 at uhub1 port 2 configuration 1 interface 0
[ 11113285.311079] uftdi1: SecuringHardware.com (0x0403) Tigard V1.1 (0x6010), rev 2.00/7.00, addr 3
[ 11113285.311079] ucom1 at uftdi1 portno 1
[ 11113285.311079] uftdi2 at uhub1 port 2 configuration 1 interface 1
[ 11113285.311079] uftdi2: SecuringHardware.com (0x0403) Tigard V1.1 (0x6010), rev 2.00/7.00, addr 3
[ 11113285.311079] ucom2 at uftdi2 portno 2

It's a combo device that, in addition to a standard TTL-level UART, has a bunch of break-out headers for doing things like SPI, SWD, and JTAG (in my case, I need to use JTAG for programming some Atmel CPLDs).  I should be able to do this with OpenOCD (pkgsrc/devel/openocd), but libfdti1 fails to find the device because libusb1 only deals in "ugen".

"ugenif" might have been a possible solution here, except for the fact that 0x0403,0x6010 is the standard VID,PID for the FTDI FT2232C, and I don't want "interface 1" of ALL FT2232C devices to get the "ugen" treatment.  The desire to use "ugen" on "interface 1" is not a property of 0x0403,0x6010, it's really a property of "SecuringHardware.com","Tigard V1.1".  Unfortunately, there's isn't a way to express that in the kernel config syntax.

I think my only short-term option here is to, in uftdi_match(), specifically reject based on this criteria:

	- VID == 0x0403
	- PID == 0x6010
	- interface number == 1
	- vendor string == "SecuringHardware.com"
	- product string == "Tigard V1.1"

(It's never useful, on this particular board, to use the second port as a UART.)

-- thorpej
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.