From 84711529d604c0abebb5e96a4da672693f0c7b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Ho=C5=A1ek?= Date: Wed, 2 Nov 2022 15:14:49 +0100 Subject: [PATCH 1/2] Output information about found FTDI device in debug mode --- fujprog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fujprog.c b/fujprog.c index 2def0b8..7bb738b 100644 --- a/fujprog.c +++ b/fujprog.c @@ -749,8 +749,11 @@ setup_usb(void) return (res); } - if (global_debug) + if (global_debug) { + fprintf(stderr, "Found FTDI device VID 0x%04X PID 0x%04X with description \"%.64s\"\n", + (deviceID >> 16), (deviceID & 0xFFFF), Description); fprintf(stderr, "Going through cable_hw_map loop\n"); + } for (hmp = cable_hw_map; hmp->cable_hw != CABLE_HW_UNKNOWN; hmp++) { if (global_debug) From 32b69eceb09185ba67990f2dae06e5f30d7ac9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Ho=C5=A1ek?= Date: Wed, 2 Nov 2022 15:18:02 +0100 Subject: [PATCH 2/2] Allow for A/B differentiation on Lattice ECP5 Evaluation Board The FT2232H on the ECP5 evaluation board has two interfaces; A is connected to JTAG and B to UART/I2C (see figure A.3 in the board's user guide). The FTDI driver apparently offers up these interfaces independently by appending " A" and " B" to the USB description ("Lattice ECP5 Evaluation Board"). Add detection of the "A" port. --- fujprog.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fujprog.c b/fujprog.c index 7bb738b..19e8b8f 100644 --- a/fujprog.c +++ b/fujprog.c @@ -453,6 +453,17 @@ static struct cable_hw_map { .tdo = 0x04, .cbus_led = 0x10 }, + { + .cable_hw = CABLE_HW_USB, + .usb_vid = 0x0403, + .usb_pid = 0x6010, + .cable_path = "Lattice ECP5 Evaluation Board A", + .tck = 0x01, + .tms = 0x08, + .tdi = 0x02, + .tdo = 0x04, + .cbus_led = 0x10 + }, { .cable_hw = CABLE_HW_USB, .usb_vid = 0x0403,