diff options
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 83 |
1 files changed, 77 insertions, 6 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 97cc87d654ce..88bef0276876 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -99,6 +99,7 @@ struct ftdi_sio_quirk { | |||
99 | static int ftdi_jtag_probe(struct usb_serial *serial); | 99 | static int ftdi_jtag_probe(struct usb_serial *serial); |
100 | static int ftdi_mtxorb_hack_setup(struct usb_serial *serial); | 100 | static int ftdi_mtxorb_hack_setup(struct usb_serial *serial); |
101 | static int ftdi_NDI_device_setup(struct usb_serial *serial); | 101 | static int ftdi_NDI_device_setup(struct usb_serial *serial); |
102 | static int ftdi_stmclite_probe(struct usb_serial *serial); | ||
102 | static void ftdi_USB_UIRT_setup(struct ftdi_private *priv); | 103 | static void ftdi_USB_UIRT_setup(struct ftdi_private *priv); |
103 | static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv); | 104 | static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv); |
104 | 105 | ||
@@ -122,6 +123,10 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = { | |||
122 | .port_probe = ftdi_HE_TIRA1_setup, | 123 | .port_probe = ftdi_HE_TIRA1_setup, |
123 | }; | 124 | }; |
124 | 125 | ||
126 | static struct ftdi_sio_quirk ftdi_stmclite_quirk = { | ||
127 | .probe = ftdi_stmclite_probe, | ||
128 | }; | ||
129 | |||
125 | /* | 130 | /* |
126 | * The 8U232AM has the same API as the sio except for: | 131 | * The 8U232AM has the same API as the sio except for: |
127 | * - it can support MUCH higher baudrates; up to: | 132 | * - it can support MUCH higher baudrates; up to: |
@@ -177,6 +182,7 @@ static struct usb_device_id id_table_combined [] = { | |||
177 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_SNIFFER_PID) }, | 182 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_SNIFFER_PID) }, |
178 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_THROTTLE_PID) }, | 183 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_THROTTLE_PID) }, |
179 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GATEWAY_PID) }, | 184 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GATEWAY_PID) }, |
185 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GBM_PID) }, | ||
180 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, | 186 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, |
181 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, | 187 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, |
182 | { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) }, | 188 | { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) }, |
@@ -200,6 +206,7 @@ static struct usb_device_id id_table_combined [] = { | |||
200 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, | 206 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, |
201 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, | 207 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, |
202 | { USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) }, | 208 | { USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) }, |
209 | { USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) }, | ||
203 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) }, | 210 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) }, |
204 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) }, | 211 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) }, |
205 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) }, | 212 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) }, |
@@ -613,6 +620,7 @@ static struct usb_device_id id_table_combined [] = { | |||
613 | { USB_DEVICE(FTDI_VID, FTDI_OCEANIC_PID) }, | 620 | { USB_DEVICE(FTDI_VID, FTDI_OCEANIC_PID) }, |
614 | { USB_DEVICE(TTI_VID, TTI_QL355P_PID) }, | 621 | { USB_DEVICE(TTI_VID, TTI_QL355P_PID) }, |
615 | { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) }, | 622 | { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) }, |
623 | { USB_DEVICE(ACTON_VID, ACTON_SPECTRAPRO_PID) }, | ||
616 | { USB_DEVICE(CONTEC_VID, CONTEC_COM1USBH_PID) }, | 624 | { USB_DEVICE(CONTEC_VID, CONTEC_COM1USBH_PID) }, |
617 | { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, | 625 | { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, |
618 | { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) }, | 626 | { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) }, |
@@ -673,8 +681,17 @@ static struct usb_device_id id_table_combined [] = { | |||
673 | { USB_DEVICE(FTDI_VID, FTDI_PCDJ_DAC2_PID) }, | 681 | { USB_DEVICE(FTDI_VID, FTDI_PCDJ_DAC2_PID) }, |
674 | { USB_DEVICE(FTDI_VID, FTDI_RRCIRKITS_LOCOBUFFER_PID) }, | 682 | { USB_DEVICE(FTDI_VID, FTDI_RRCIRKITS_LOCOBUFFER_PID) }, |
675 | { USB_DEVICE(FTDI_VID, FTDI_ASK_RDR400_PID) }, | 683 | { USB_DEVICE(FTDI_VID, FTDI_ASK_RDR400_PID) }, |
676 | { USB_DEVICE(ICOM_ID1_VID, ICOM_ID1_PID) }, | 684 | { USB_DEVICE(ICOM_VID, ICOM_ID_1_PID) }, |
677 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_TMU_PID) }, | 685 | { USB_DEVICE(ICOM_VID, ICOM_OPC_U_UC_PID) }, |
686 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2C1_PID) }, | ||
687 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2C2_PID) }, | ||
688 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2D_PID) }, | ||
689 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2VT_PID) }, | ||
690 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2VR_PID) }, | ||
691 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP4KVT_PID) }, | ||
692 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP4KVR_PID) }, | ||
693 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2KVT_PID) }, | ||
694 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2KVR_PID) }, | ||
678 | { USB_DEVICE(FTDI_VID, FTDI_ACG_HFDUAL_PID) }, | 695 | { USB_DEVICE(FTDI_VID, FTDI_ACG_HFDUAL_PID) }, |
679 | { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, | 696 | { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, |
680 | { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, | 697 | { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, |
@@ -696,6 +713,7 @@ static struct usb_device_id id_table_combined [] = { | |||
696 | .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, | 713 | .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, |
697 | { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, | 714 | { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, |
698 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, | 715 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, |
716 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_CT29B_PID) }, | ||
699 | { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, | 717 | { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, |
700 | { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, | 718 | { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, |
701 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, | 719 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, |
@@ -715,8 +733,37 @@ static struct usb_device_id id_table_combined [] = { | |||
715 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 733 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
716 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, | 734 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, |
717 | { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, | 735 | { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, |
736 | |||
737 | /* Papouch devices based on FTDI chip */ | ||
738 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485_PID) }, | ||
739 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_AP485_PID) }, | ||
740 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB422_PID) }, | ||
741 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485_2_PID) }, | ||
742 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_AP485_2_PID) }, | ||
743 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB422_2_PID) }, | ||
744 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485S_PID) }, | ||
745 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485C_PID) }, | ||
746 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_LEC_PID) }, | ||
747 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB232_PID) }, | ||
748 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_TMU_PID) }, | ||
749 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_IRAMP_PID) }, | ||
750 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_DRAK5_PID) }, | ||
751 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO8x8_PID) }, | ||
718 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, | 752 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, |
753 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO2x2_PID) }, | ||
754 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO10x1_PID) }, | ||
755 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO30x3_PID) }, | ||
756 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO60x3_PID) }, | ||
757 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO2x16_PID) }, | ||
758 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO3x32_PID) }, | ||
759 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_DRAK6_PID) }, | ||
760 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_UPSUSB_PID) }, | ||
761 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_MU_PID) }, | ||
762 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SIMUKEY_PID) }, | ||
719 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_AD4USB_PID) }, | 763 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_AD4USB_PID) }, |
764 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_GMUX_PID) }, | ||
765 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_GMSR_PID) }, | ||
766 | |||
720 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, | 767 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, |
721 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, | 768 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, |
722 | { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, | 769 | { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, |
@@ -751,6 +798,7 @@ static struct usb_device_id id_table_combined [] = { | |||
751 | { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH4_PID), | 798 | { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH4_PID), |
752 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 799 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
753 | { USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) }, | 800 | { USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) }, |
801 | { USB_DEVICE(FTDI_VID, ACCESIO_COM4SM_PID) }, | ||
754 | { USB_DEVICE(IONICS_VID, IONICS_PLUGCOMPUTER_PID), | 802 | { USB_DEVICE(IONICS_VID, IONICS_PLUGCOMPUTER_PID), |
755 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 803 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
756 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_24_MASTER_WING_PID) }, | 804 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_24_MASTER_WING_PID) }, |
@@ -761,6 +809,14 @@ static struct usb_device_id id_table_combined [] = { | |||
761 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MAXI_WING_PID) }, | 809 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MAXI_WING_PID) }, |
762 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MEDIA_WING_PID) }, | 810 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MEDIA_WING_PID) }, |
763 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_WING_PID) }, | 811 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_WING_PID) }, |
812 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) }, | ||
813 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) }, | ||
814 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) }, | ||
815 | { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) }, | ||
816 | { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID), | ||
817 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | ||
818 | { USB_DEVICE(ST_VID, ST_STMCLT1030_PID), | ||
819 | .driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk }, | ||
764 | { }, /* Optional parameter entry */ | 820 | { }, /* Optional parameter entry */ |
765 | { } /* Terminating entry */ | 821 | { } /* Terminating entry */ |
766 | }; | 822 | }; |
@@ -1642,6 +1698,25 @@ static int ftdi_jtag_probe(struct usb_serial *serial) | |||
1642 | } | 1698 | } |
1643 | 1699 | ||
1644 | /* | 1700 | /* |
1701 | * First and second port on STMCLiteadaptors is reserved for JTAG interface | ||
1702 | * and the forth port for pio | ||
1703 | */ | ||
1704 | static int ftdi_stmclite_probe(struct usb_serial *serial) | ||
1705 | { | ||
1706 | struct usb_device *udev = serial->dev; | ||
1707 | struct usb_interface *interface = serial->interface; | ||
1708 | |||
1709 | dbg("%s", __func__); | ||
1710 | |||
1711 | if (interface == udev->actconfig->interface[2]) | ||
1712 | return 0; | ||
1713 | |||
1714 | dev_info(&udev->dev, "Ignoring serial port reserved for JTAG\n"); | ||
1715 | |||
1716 | return -ENODEV; | ||
1717 | } | ||
1718 | |||
1719 | /* | ||
1645 | * The Matrix Orbital VK204-25-USB has an invalid IN endpoint. | 1720 | * The Matrix Orbital VK204-25-USB has an invalid IN endpoint. |
1646 | * We have to correct it if we want to read from it. | 1721 | * We have to correct it if we want to read from it. |
1647 | */ | 1722 | */ |
@@ -2028,8 +2103,6 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2028 | "urb failed to set to rts/cts flow control\n"); | 2103 | "urb failed to set to rts/cts flow control\n"); |
2029 | } | 2104 | } |
2030 | 2105 | ||
2031 | /* raise DTR/RTS */ | ||
2032 | set_mctrl(port, TIOCM_DTR | TIOCM_RTS); | ||
2033 | } else { | 2106 | } else { |
2034 | /* | 2107 | /* |
2035 | * Xon/Xoff code | 2108 | * Xon/Xoff code |
@@ -2077,8 +2150,6 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2077 | } | 2150 | } |
2078 | } | 2151 | } |
2079 | 2152 | ||
2080 | /* lower DTR/RTS */ | ||
2081 | clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); | ||
2082 | } | 2153 | } |
2083 | return; | 2154 | return; |
2084 | } | 2155 | } |