summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-07-11 07:17:59 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-07-11 07:17:59 +0000
commitf9d32990c8ffdc5550a42b6c49c7b6fe0248b829 (patch)
tree5f60cdb4b59dc4eaf98c357e31d102494e30bf8b /sys
parent55c50a3bc70610d195df2201fbd4310c3048066d (diff)
support 4 more uftdi ports (3 from freebsd, 1 from netbsd)
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/uftdi.c84
-rw-r--r--sys/dev/usb/uftdireg.h6
-rw-r--r--sys/dev/usb/usbdevs22
3 files changed, 81 insertions, 31 deletions
diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c
index 6bfff625e51..f87d08d0c2c 100644
--- a/sys/dev/usb/uftdi.c
+++ b/sys/dev/usb/uftdi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uftdi.c,v 1.15 2004/04/09 16:54:35 deraadt Exp $ */
+/* $OpenBSD: uftdi.c,v 1.16 2004/07/11 07:17:58 deraadt Exp $ */
/* $NetBSD: uftdi.c,v 1.14 2003/02/23 04:20:07 simonb Exp $ */
/*
@@ -138,12 +138,21 @@ USB_MATCH(uftdi)
if (uaa->vendor == USB_VENDOR_FTDI &&
(uaa->product == USB_PRODUCT_FTDI_SERIAL_8U100AX ||
uaa->product == USB_PRODUCT_FTDI_SERIAL_8U232AM ||
- uaa->product == USB_PRODUCT_FTDI_LCD_MX200_USB ||
- uaa->product == USB_PRODUCT_FTDI_LCD_CFA631_USB ||
- uaa->product == USB_PRODUCT_FTDI_LCD_CFA632_USB ||
- uaa->product == USB_PRODUCT_FTDI_LCD_CFA633_USB ||
- uaa->product == USB_PRODUCT_FTDI_LCD_CFA634_USB))
+ uaa->product == USB_PRODUCT_FTDI_SEMC_DSS20 ||
+ uaa->product == USB_PRODUCT_FTDI_LCD_LK202_24 ||
+ uaa->product == USB_PRODUCT_FTDI_LCD_MX200 ||
+ uaa->product == USB_PRODUCT_FTDI_LCD_CFA_631 ||
+ uaa->product == USB_PRODUCT_FTDI_LCD_CFA_632 ||
+ uaa->product == USB_PRODUCT_FTDI_LCD_CFA_633 ||
+ uaa->product == USB_PRODUCT_FTDI_LCD_CFA_634))
return (UMATCH_VENDOR_PRODUCT);
+ if (uaa->vendor == USB_VENDOR_SIIG2 &&
+ (uaa->product == USB_PRODUCT_SIIG2_US2308))
+ return (UMATCH_VENDOR_PRODUCT);
+ if (uaa->vendor == USB_VENDOR_INTREPIDCS &&
+ (uaa->product == USB_PRODUCT_INTREPIDCS_VALUECAN ||
+ uaa->product == USB_PRODUCT_INTREPIDCS_NEOVI))
+ return (UMATCH_VENDOR_PRODUCT);
return (UMATCH_NONE);
}
@@ -187,26 +196,55 @@ USB_ATTACH(uftdi)
sc->sc_udev = dev;
sc->sc_iface = iface;
- switch (uaa->product) {
- case USB_PRODUCT_FTDI_SERIAL_8U100AX:
- sc->sc_type = UFTDI_TYPE_SIO;
- sc->sc_hdrlen = 1;
+ switch (uaa->vendor) {
+ case USB_VENDOR_FTDI:
+ switch (uaa->product) {
+ case USB_PRODUCT_FTDI_SERIAL_8U100AX:
+ sc->sc_type = UFTDI_TYPE_SIO;
+ sc->sc_hdrlen = 1;
+ break;
+
+ case USB_PRODUCT_FTDI_SEMC_DSS20:
+ case USB_PRODUCT_FTDI_SERIAL_8U232AM:
+ case USB_PRODUCT_FTDI_LCD_LK202_24:
+ case USB_PRODUCT_FTDI_LCD_MX200:
+ case USB_PRODUCT_FTDI_LCD_CFA_631:
+ case USB_PRODUCT_FTDI_LCD_CFA_632:
+ case USB_PRODUCT_FTDI_LCD_CFA_633:
+ case USB_PRODUCT_FTDI_LCD_CFA_634:
+ sc->sc_type = UFTDI_TYPE_8U232AM;
+ sc->sc_hdrlen = 0;
+ break;
+
+ default: /* Can't happen */
+ goto bad;
+ }
break;
- case USB_PRODUCT_FTDI_SERIAL_8U232AM:
- case USB_PRODUCT_FTDI_LCD_LK202_24_USB:
- case USB_PRODUCT_FTDI_LCD_MX200_USB:
- case USB_PRODUCT_FTDI_LCD_CFA631_USB:
- case USB_PRODUCT_FTDI_LCD_CFA632_USB:
- case USB_PRODUCT_FTDI_LCD_CFA633_USB:
- case USB_PRODUCT_FTDI_LCD_CFA634_USB:
+ case USB_VENDOR_INTREPIDCS:
+ switch (uaa->product) {
+ case USB_PRODUCT_INTREPIDCS_VALUECAN:
+ case USB_PRODUCT_INTREPIDCS_NEOVI:
sc->sc_type = UFTDI_TYPE_8U232AM;
- sc->sc_hdrlen = 0;
+ sc->sc_hdrlen = 0;
+ break;
+
+ default: /* Can't happen */
+ goto bad;
+ }
break;
-
- default: /* Can't happen */
- goto bad;
- }
+
+ case USB_VENDOR_SIIG2:
+ switch (uaa->product) {
+ case USB_PRODUCT_SIIG2_US2308:
+ sc->sc_type = UFTDI_TYPE_8U232AM;
+ sc->sc_hdrlen = 0;
+ break;
+ default: /* Can't happen */
+ goto bad;
+ }
+ break;
+ }
uca.bulkin = uca.bulkout = -1;
for (i = 0; i < id->bNumEndpoints; i++) {
@@ -474,6 +512,8 @@ uftdi_param(void *vsc, int portno, struct termios *t)
case 230400: rate = ftdi_8u232am_b230400; break;
case 460800: rate = ftdi_8u232am_b460800; break;
case 921600: rate = ftdi_8u232am_b921600; break;
+ case 2000000: rate = ftdi_8u232am_b2000000; break;
+ case 3000000: rate = ftdi_8u232am_b3000000; break;
default:
return (EINVAL);
}
diff --git a/sys/dev/usb/uftdireg.h b/sys/dev/usb/uftdireg.h
index 3228634d55a..6ab234a73d4 100644
--- a/sys/dev/usb/uftdireg.h
+++ b/sys/dev/usb/uftdireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uftdireg.h,v 1.8 2002/07/25 04:07:32 nate Exp $ */
+/* $OpenBSD: uftdireg.h,v 1.9 2004/07/11 07:17:58 deraadt Exp $ */
/* $NetBSD: uftdireg.h,v 1.6 2002/07/11 21:14:28 augustss Exp $ */
/*
@@ -104,7 +104,9 @@ enum {
ftdi_8u232am_b115200 = 0x001a,
ftdi_8u232am_b230400 = 0x000d,
ftdi_8u232am_b460800 = 0x4006,
- ftdi_8u232am_b921600 = 0x8003
+ ftdi_8u232am_b921600 = 0x8003,
+ ftdi_8u232am_b2000000 = 0x0001, /* special case for 2M baud */
+ ftdi_8u232am_b3000000 = 0x0000, /* special case for 3M baud */
};
/*
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index e05c7962826..bffed14b172 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -1,4 +1,4 @@
-$OpenBSD: usbdevs,v 1.91 2004/07/11 06:21:06 deraadt Exp $
+$OpenBSD: usbdevs,v 1.92 2004/07/11 07:17:58 deraadt Exp $
/* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */
/*
@@ -307,6 +307,7 @@ vendor ALATION 0x0910 Alation Systems
vendor CONCORDCAMERA 0x0919 Concord Camera
vendor GOHUBS 0x0921 GoHubs
vendor BIOMETRIC 0x0929 American Biometric Company
+vendor INTREPIDCS 0x093c Intrepid
vendor YANO 0x094f Yano
vendor KINGSTON 0x0951 Kingston Technology
vendor BLUEWATER 0x0956 BlueWater Systems
@@ -337,6 +338,7 @@ vendor GREENHOUSE 0x0a6b GREENHOUSE
vendor GEOCAST 0x0a79 Geocast Network Systems
vendor NEODIO 0x0aec Neodio
vendor TODOS 0x0b0c Todos Data System
+vendor SIIG2 0x0b39 SIIG
vendor NEC2 0x0b62 NEC
vendor ATI2 0x0b6f ATI
vendor KURUSUGAWA 0x0b7e Kurusugawa Electronics, Inc.
@@ -724,12 +726,13 @@ product FREECOM DVD 0xfc01 Connector for DVD drive
product FTDI SERIAL_8U232AM 0x6001 8U232AM Serial converter
product FTDI PS2KBDMS 0x8371 PS/2 Keyboard/Mouse
product FTDI SERIAL_8U100AX 0x8372 Serial converter
-product FTDI LCD_MX200_USB 0xfa01 Matrix Orbital MX200 Series LCD
-product FTDI LCD_LK202_24_USB 0xfa03 Matrix Orbital LK202-24 LCD
-product FTDI LCD_CFA631_USB 0xfc0c Crystalfontz CFA-631 LCD
-product FTDI LCD_CFA632_USB 0xfc08 Crystalfontz CFA-632 LCD
-product FTDI LCD_CFA633_USB 0xfc0b Crystalfontz CFA-633 LCD
-product FTDI LCD_CFA634_USB 0xfc09 Crystalfontz CFA-634 LCD
+product FTDI LCD_MX200 0xfa01 Matrix Orbital MX200 Series LCD
+product FTDI LCD_LK202_24 0xfa03 Matrix Orbital LK202-24 LCD
+product FTDI LCD_CFA_631 0xfc0c Crystalfontz CFA-631 LCD
+product FTDI LCD_CFA_632 0xfc08 Crystalfontz CFA-632 LCD
+product FTDI LCD_CFA_633 0xfc0b Crystalfontz CFA-633 LCD
+product FTDI LCD_CFA_634 0xfc09 Crystalfontz CFA-634 LCD
+product FTDI SEMC_DSS20 0xfc82 SEMC DSS-20 SyncStation
/* Fuji photo products */
product FUJIPHOTO MASS0100 0x0100 Mass Storage
@@ -862,6 +865,10 @@ product INTEL TESTBOARD 0x9890 82930 test board
/* Intersil products */
product INTERSIL PRISM_2X 0x3642 Prism2.x WLAN
+/* Interpid Control Systems products */
+product INTREPIDCS VALUECAN 0x0601 ValueCAN CAN
+product INTREPIDCS NEOVI 0x0701 NeoVI Blue
+
/* I/O DATA products */
product IODATA USBSSMRW 0x0314 USB-SSMRW SD-card
product IODATA USBSDRW 0x031e USB-SDRW SD-card
@@ -1358,6 +1365,7 @@ product SIGMATEL DNSSF7X 0x8020 Datum Networks SSF-7X Multi Players
/* SIIG products */
product SIIG DIGIFILMREADER 0x0004 DigiFilm-Combo
product SIIG MULTICARDREADER 0x0201 MULTICARDREADER
+product SIIG2 US2308 0x0421 Serial
/* Silicon Portals Inc. */
product SILICONPORTALS YAPPH_NF 0x0200 YAP Phone (no firmware)