USB: serial: ftdi_sio: add support for HP and HA devices
authorAmireddy mallikarjuna reddy <mallikarjuna.reddy@ftdichip.com>
Sun, 11 Sep 2022 14:02:16 +0000 (16:02 +0200)
committerJohan Hovold <johan@kernel.org>
Thu, 15 Sep 2022 06:06:06 +0000 (08:06 +0200)
Add the product IDs for the USB-to-Serial devices FT2233HP, FT2232HP,
FT4233HP, FT4232HP, FT233HP, FT232HP, and FT4232HA.
Also include BCD values so that the chip type can be determined.

Signed-off-by: Amireddy mallikarjuna reddy <mallikarjuna.reddy@ftdichip.com>
Link: https://lore.kernel.org/r/ac28f2c5eba23a645b3b9299c224f2755a233eef.1658385786.git.mallikarjuna.reddy@ftdichip.com
[ johan: rebase on type-handling rework, drop "Q" from automotive type
         name ]
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio_ids.h

index 79069c0fb587bad3b2cd9977561bbbd4032b0d8c..1d6190504d89f6ed00c416569878e4e6b8b22c8a 100644 (file)
@@ -56,6 +56,13 @@ enum ftdi_chip_type {
        FT232H,
        FT2232H,
        FT4232H,
+       FT4232HA,
+       FT232HP,
+       FT233HP,
+       FT2232HP,
+       FT2233HP,
+       FT4232HP,
+       FT4233HP,
        FTX,
 };
 
@@ -189,6 +196,13 @@ static const struct usb_device_id id_table_combined[] = {
        { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_232H_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_FTX_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_FT2233HP_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_FT4233HP_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_FT2232HP_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_FT4232HP_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_FT233HP_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_FT232HP_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_FT4232HA_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) },
@@ -1078,6 +1092,13 @@ static const char *ftdi_chip_name[] = {
        [FT232H]        = "FT232H",
        [FT2232H]       = "FT2232H",
        [FT4232H]       = "FT4232H",
+       [FT4232HA]      = "FT4232HA",
+       [FT232HP]       = "FT232HP",
+       [FT233HP]       = "FT233HP",
+       [FT2232HP]      = "FT2232HP",
+       [FT2233HP]      = "FT2233HP",
+       [FT4232HP]      = "FT4232HP",
+       [FT4233HP]      = "FT4233HP",
        [FTX]           = "FT-X",
 };
 
@@ -1595,6 +1616,27 @@ static int ftdi_determine_type(struct usb_serial_port *port)
                priv->chip_type = FTX;
                priv->baud_base = 48000000 / 2;
                break;
+       case 0x2800:
+               priv->chip_type = FT2233HP;
+               break;
+       case 0x2900:
+               priv->chip_type = FT4233HP;
+               break;
+       case 0x3000:
+               priv->chip_type = FT2232HP;
+               break;
+       case 0x3100:
+               priv->chip_type = FT4232HP;
+               break;
+       case 0x3200:
+               priv->chip_type = FT233HP;
+               break;
+       case 0x3300:
+               priv->chip_type = FT232HP;
+               break;
+       case 0x3600:
+               priv->chip_type = FT4232HA;
+               break;
        default:
                if (version < 0x200) {
                        priv->chip_type = SIO;
index 31c8ccabbbb7856be0b05f3257a24f67e7ada2aa..e2099445db708f90ab5122e6180150e4c7d947fc 100644 (file)
 #define FTDI_4232H_PID 0x6011 /* Quad channel hi-speed device */
 #define FTDI_232H_PID  0x6014 /* Single channel hi-speed device */
 #define FTDI_FTX_PID   0x6015 /* FT-X series (FT201X, FT230X, FT231X, etc) */
+#define FTDI_FT2233HP_PID      0x6040 /* Dual channel hi-speed device with PD */
+#define FTDI_FT4233HP_PID      0x6041 /* Quad channel hi-speed device with PD */
+#define FTDI_FT2232HP_PID      0x6042 /* Dual channel hi-speed device with PD */
+#define FTDI_FT4232HP_PID      0x6043 /* Quad channel hi-speed device with PD */
+#define FTDI_FT233HP_PID       0x6044 /* Dual channel hi-speed device with PD */
+#define FTDI_FT232HP_PID       0x6045 /* Dual channel hi-speed device with PD */
+#define FTDI_FT4232HA_PID      0x6048 /* Quad channel automotive grade hi-speed device */
 #define FTDI_SIO_PID   0x8372  /* Product Id SIO application of 8U100AX */
 #define FTDI_232RL_PID  0xFBFA  /* Product ID for FT232RL */