diff --git a/configure.in b/configure.in
index 7f31e1d..be1cbd1 100644
--- a/configure.in
+++ b/configure.in
@@ -1005,6 +1005,24 @@ enum ftdi_chip_type x = TYPE_2232H;
       AC_MSG_WARN([You need a newer libftdi version (0.16 or later).])
     fi
 
+AC_MSG_CHECKING([for libftdi ftdi_usb_open_desc_index support])
+AC_LINK_IFELSE([
+#include <stdio.h>
+#include <ftdi.h>
+int main(int argc, char **argv)
+{
+  ftdi_usb_open_desc_index(NULL, 0, 0, NULL, NULL, 0);
+  return 0;
+}
+    ], [
+      AC_DEFINE(HAVE_FT2232_OPEN_DESC_INDEX, [1],
+        [Have ftdi_usb_open_desc_index function.])
+      have_ft2232_open_desc_index=yes
+    ], [
+      have_ft2232_open_desc_index=no
+    ])
+    AC_MSG_RESULT([$have_ft2232_open_desc_index])
+
   # Restore the 'unexpanded ldflags'
   LDFLAGS=$LDFLAGS_SAVE
   CFLAGS=$CFLAGS_SAVE
diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c
index 1a0eb4b..be426f3 100644
--- a/src/jtag/drivers/ft2232.c
+++ b/src/jtag/drivers/ft2232.c
@@ -154,6 +154,7 @@ static int ft2232_stableclocks(int num_cycles, struct jtag_command* cmd);
 static char *       ft2232_device_desc_A = NULL;
 static char*        ft2232_device_desc = NULL;
 static char*        ft2232_serial  = NULL;
+static uint8_t		ft2232_index = 0;
 static uint8_t		ft2232_latency = 2;
 static unsigned		ft2232_max_tck = FTDI_2232C_MAX_TCK;
 
@@ -2253,8 +2254,13 @@ static int ft2232_init_libftdi(uint16_t vid, uint16_t pid, int more, int* try_mo
 	}
 
 	/* context, vendor id, product id */
+#if HAVE_FT2232_OPEN_DESC_INDEX == 1
+	if (ftdi_usb_open_desc_index(&ftdic, vid, pid, ft2232_device_desc,
+				ft2232_serial, ft2232_index) < 0)
+#else
 	if (ftdi_usb_open_desc(&ftdic, vid, pid, ft2232_device_desc,
 				ft2232_serial) < 0)
+#endif
 	{
 		if (more)
 			LOG_WARNING("unable to open ftdi device (trying more): %s",
@@ -3211,6 +3217,23 @@ COMMAND_HANDLER(ft2232_handle_serial_command)
 	return ERROR_OK;
 }
 
+COMMAND_HANDLER(ft2232_handle_index_command)
+{
+	if (CMD_ARGC == 1)
+	{
+		ft2232_index = atoi(CMD_ARGV[0]);
+#if HAVE_FT2232_OPEN_DESC_INDEX != 1
+		LOG_ERROR("ft2232_index available only in libftdi 0.18 and later, ignoring");
+#endif
+	}
+	else
+	{
+		LOG_ERROR("expected exactly one argument to ft2232_index <index>");
+	}
+
+	return ERROR_OK;
+}
+
 COMMAND_HANDLER(ft2232_handle_layout_command)
 {
 	if (CMD_ARGC != 1) {
@@ -4378,6 +4401,13 @@ static const struct command_registration ft2232_command_handlers[] = {
 		.usage = "(vid pid)* ",
 	},
 	{
+		.name = "ft2232_index",
+		.handler = &ft2232_handle_index_command,
+		.mode = COMMAND_CONFIG,
+		.help = "set the index of the FTDI FT2232 device",
+		.usage = "index_number",
+	},
+	{
 		.name = "ft2232_latency",
 		.handler = &ft2232_handle_latency_command,
 		.mode = COMMAND_CONFIG,
