USB: serial: ftdi_sio: add support for Altera USB Blaster 3
Subsystems (2)
PATCH v2 1/1 USB: serial: ftdi_sio: add support for Altera USB Blaster 3
The Altera USB Blaster 3, available as both a cable and an on-board solution, is primarily used for programming and debugging FPGAs.
It interfaces with host software such as Quartus Programmer, System Console, SignalTap, and Nios Debugger. The device utilizes either an FT2232 or FT4232 chip.
Enabling support for various configurations of the USB Blaster 3 by including the appropriate VID/PID pairs, allowing it to function as a serial device via ftdi_sio. The configurations are determined by the hardware design and include:
1) PID 0x6020, FT2232, 1 JTAG port
2) PID 0x6021, FT2232, 2 JTAG ports
3) PID 0x6022, FT2232, 1 JTAG port + Port B as UART
4) PID 0x6023, FT2232, Cable USB-Blaster 3
5) PID 0x6024, FT4232, 1 JTAG port
6) PID 0x6025, FT4232, 1 JTAG port + Port C as UART
7) PID 0x6026, FT4232, 1 JTAG port + Port C, D as UART
8) PID 0x602e, FT4232, 1 JTAG port + Port B, C, D as UART
These configurations allow for flexibility in how the USB Blaster 3 is used, depending on the specific needs of the hardware design.
--- drivers/usb/serial/ftdi_sio.c | 14 ++++++++++++++ drivers/usb/serial/ftdi_sio_ids.h | 13 +++++++++++++ 2 files changed, 27 insertions(+)
drivers/usb/serial/ftdi_sio.c +14 -0
@@ -1079,6 +1079,20 @@ static const struct usb_device_id id_table_combined[] = { .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },/* GMC devices */ { USB_DEVICE(GMC_VID, GMC_Z216C_PID) }, +/* Altera USB Blaster 3 */ + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6022_PID, 1) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6025_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6026_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6026_PID, 3) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6029_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602A_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602A_PID, 3) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602C_PID, 1) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602D_PID, 1) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602D_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 1) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 3) }, { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio_ids.h +13 -0
@@ -1612,3 +1612,16 @@*/ #define GMC_VID 0x1cd7#define GMC_Z216C_PID 0x0217/* GMC Z216C Adapter IR-USB */ + +/* +* Altera USB Blaster 3 (http://www.altera.com). +*/ +#define ALTERA_VID 0x09fb +#define ALTERA_UB3_6022_PID 0x6022 +#define ALTERA_UB3_6025_PID 0x6025 +#define ALTERA_UB3_6026_PID 0x6026 +#define ALTERA_UB3_6029_PID 0x6029 +#define ALTERA_UB3_602A_PID 0x602a +#define ALTERA_UB3_602C_PID 0x602c +#define ALTERA_UB3_602D_PID 0x602d +#define ALTERA_UB3_602E_PID 0x602e
Signature · 1 line
2.25.1
Johan Hovold
maintainerQuoted 21 lines · Boon Khai Ng
The Altera USB Blaster 3, available as both a cable and an on-board solution, is primarily used for programming and debugging FPGAs.
It interfaces with host software such as Quartus Programmer, System Console, SignalTap, and Nios Debugger. The device utilizes either an FT2232 or FT4232 chip.
Enabling support for various configurations of the USB Blaster 3 by including the appropriate VID/PID pairs, allowing it to function as a serial device via
ftdi_sio. The configurations are determined by the hardware design and include:1) PID
0x6020, FT2232, 1 JTAG port
2) PID0x6021, FT2232, 2 JTAG ports
3) PID0x6022, FT2232, 1 JTAG port + Port B as UART
4) PID0x6023, FT2232, Cable USB-Blaster 3
5) PID0x6024, FT4232, 1 JTAG port
6) PID0x6025, FT4232, 1 JTAG port + Port C as UART
7) PID0x6026, FT4232, 1 JTAG port + Port C, D as UART
8) PID0x602e, FT4232, 1 JTAG port + Port B, C, D as UART
Quoted 6 lines
These configurations allow for flexibility in how the USB Blaster 3 is used, depending on the specific needs of the hardware design.
Signed-off-by Boon Khai Ng <[email protected]>---
Thanks for the update, I've applied this one now.
But for your future contributions, remember to put a short changelog here under the cut-off (---) line when revising patches.
Quoted 14 lines
drivers/usb/serial/ftdi_sio.c | 14 ++++++++++++++ drivers/usb/serial/ftdi_sio_ids.h | 13 +++++++++++++ 2 files changed, 27 insertions(+)drivers/usb/serial/ftdi_sio.c +2
-0@@ -1079,6 +1079,20 @@ static const struct usb_device_id id_table_combined[] = { .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },/* GMC devices */ { USB_DEVICE(GMC_VID, GMC_Z216C_PID) }, +/* Altera USB Blaster 3 */ + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6022_PID, 1) },
drivers/usb/serial/ftdi_sio.c static const struct usb_device_id id_table_combined[] = { · line 1093
Quoted 10 lines
drivers/usb/serial/ftdi_sio.c +9
-0+ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6025_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6026_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6026_PID, 3) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6029_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602A_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602A_PID, 3) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602C_PID, 1) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602D_PID, 1) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602D_PID, 2) },
These configurations were not mentioned in the commit message. Are they also used for embedded designs?
drivers/usb/serial/ftdi_sio.c static const struct usb_device_id id_table_combined[] = { · line 1097
Quoted 5 lines
drivers/usb/serial/ftdi_sio.c +3
-0+ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 1) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 2) }, + { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 3) }, { } /* Terminating entry */ };
Johan
Quoted 3 lines
But for your future contributions, remember to put a short changelog here under the cut-off (---) line when revising patches.
My apology will include that next time.
Quoted 3 lines
These configurations were not mentioned in the commit message. Are they also used for embedded designs?
Looks like the table I provided in the commit message is mismatched with the one that I intended to check in for upstream.
Let me correct this, the one that I published for upstream was the actual tested code, whereby we want the UART to be exposed to the ftdi_sio driver.
Below is the updated table,
1) PID 0x6022, FT2232, 1 JTAG port(Port A) + Port B as UART
2) PID 0x6025, FT4232, 1 JTAG port(Port A) + Port C as UART
3) PID 0x6026, FT4232, 1 JTAG port(Port A) + Port C, D as UART
4) PID 0x6029, FT4232, 1 JTAG port(Port B) + Port C as UART
5) PID 0x602a, FT4232, 1 JTAG port(Port B) + Port C, D as UART
6) PID 0x602c, FT4232, 1 JTAG port(Port A) + Port B as UART
7) PID 0x602d, FT4232, 1 JTAG port(Port A) + Port B, C as UART
8) PID 0x602e, FT4232, 1 JTAG port(Port A) + Port B, C, D as UART
Since we need UART to be exposed to the ftdi_sio driver and the cable USB Blaster does not support UART, will reword that on the commit message to remove the cable USB Blaster and left only the on-board USB Blaster.
Will submit a v3 on this, with the reworded commit message plus the change log.
Johan Hovold
maintainerQuoted 19 lines · Boon Khai
Quoted 2 lines
These configurations were not mentioned in the commit message. Are they also used for embedded designs?
Looks like the table I provided in the commit message is mismatched with the one that I intended to check in for upstream.
Let me correct this, the one that I published for upstream was the actual tested code, whereby we want the UART to be exposed to the
ftdi_siodriver.Below is the updated table,
1) PID0x6022, FT2232, 1 JTAG port(Port A) + Port B as UART
2) PID0x6025, FT4232, 1 JTAG port(Port A) + Port C as UART
3) PID0x6026, FT4232, 1 JTAG port(Port A) + Port C, D as UART
4) PID0x6029, FT4232, 1 JTAG port(Port B) + Port C as UART
5) PID0x602a, FT4232, 1 JTAG port(Port B) + Port C, D as UART
6) PID0x602c, FT4232, 1 JTAG port(Port A) + Port B as UART
7) PID0x602d, FT4232, 1 JTAG port(Port A) + Port B, C as UART
8) PID0x602e, FT4232, 1 JTAG port(Port A) + Port B, C, D as UART
Quoted 3 lines
Since we need UART to be exposed to the
ftdi_siodriver and the cable USB Blaster does not support UART, will reword that on the commit message to remove the cable USB Blaster and left only the on-board USB Blaster.
It may still be good to mention the cable in some way as it's not obvious that there are both standalone (cable) and embedded variants.
Quoted 1 line
Will submit a v3 on this, with the reworded commit message plus the change log.
Sounds good. I'll wait for the v3.
Johan
Quoted 2 lines
It may still be good to mention the cable in some way as it's not obvious that there are both standalone (cable) and embedded variants.
Alright Johan, will keep the USB Blaster 3 cable in the commit message, and mention about the changes in this commit not including the cable because it does not have UART.
Regards,
Boon Khai