FreeCalypso > hg > freecalypso-hwlab
annotate linux-patch/minpatch-4.4.14/0001-USB-serial-ftdi_sio-add-support-for-FreeCalypso-JTAG.patch @ 83:d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 06 Dec 2020 02:55:40 +0000 |
parents | |
children |
rev | line source |
---|---|
83
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 From 5af8e2ad7d0295d90cb2bc566f3d935668fb0535 Mon Sep 17 00:00:00 2001 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 From: "Mychaela N. Falconia" <falcon@freecalypso.org> |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 Date: Wed, 16 Sep 2020 01:56:29 +0000 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 Subject: [PATCH 1/3] USB: serial: ftdi_sio: add support for FreeCalypso |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 JTAG+UART adapters |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 commit 6cf87e5edd9944e1d3b6efd966ea401effc304ee upstream. |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 There exist many FT2232-based JTAG+UART adapter designs in which |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 FT2232 Channel A is used for JTAG and Channel B is used for UART. |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 The best way to handle them in Linux is to have the ftdi_sio driver |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 create a ttyUSB device only for Channel B and not for Channel A: |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 a ttyUSB device for Channel A would be bogus and will disappear as |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 soon as the user runs OpenOCD or other applications that access |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 Channel A for JTAG from userspace, causing undesirable noise for |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 users. The ftdi_sio driver already has a dedicated quirk for such |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 JTAG+UART FT2232 adapters, and it requires assigning custom USB IDs |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 to such adapters and adding these IDs to the driver with the |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 ftdi_jtag_quirk applied. |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 Boutique hardware manufacturer Falconia Partners LLC has created a |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 couple of JTAG+UART adapter designs (one buffered, one unbuffered) |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 as part of FreeCalypso project, and this hardware is specifically made |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 to be used with Linux hosts, with the intent that Channel A will be |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 accessed only from userspace via appropriate applications, and that |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 Channel B will be supported by the ftdi_sio kernel driver, presenting |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 a standard ttyUSB device to userspace. Toward this end the hardware |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 manufacturer will be programming FT2232 EEPROMs with custom USB IDs, |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 specifically with the intent that these IDs will be recognized by |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 the ftdi_sio driver with the ftdi_jtag_quirk applied. |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 Signed-off-by: Mychaela N. Falconia <falcon@freecalypso.org> |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 [johan: insert in PID order and drop unused define] |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 Cc: stable@vger.kernel.org |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 Signed-off-by: Johan Hovold <johan@kernel.org> |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 --- |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 drivers/usb/serial/ftdi_sio.c | 5 +++++ |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 drivers/usb/serial/ftdi_sio_ids.h | 7 +++++++ |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 2 files changed, 12 insertions(+) |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 index b61f12160d37..984a93c38365 100644 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 --- a/drivers/usb/serial/ftdi_sio.c |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 +++ b/drivers/usb/serial/ftdi_sio.c |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 @@ -1008,6 +1008,11 @@ static const struct usb_device_id id_table_combined[] = { |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 { USB_DEVICE(ICPDAS_VID, ICPDAS_I7560U_PID) }, |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 { USB_DEVICE(ICPDAS_VID, ICPDAS_I7561U_PID) }, |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 { USB_DEVICE(ICPDAS_VID, ICPDAS_I7563U_PID) }, |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 + /* FreeCalypso USB adapters */ |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 + { USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_BUF_PID), |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 + { USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_UNBUF_PID), |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 { } /* Terminating entry */ |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 }; |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 index c5d6c1e73e8e..6218f9c45016 100644 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 --- a/drivers/usb/serial/ftdi_sio_ids.h |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 +++ b/drivers/usb/serial/ftdi_sio_ids.h |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 @@ -38,6 +38,13 @@ |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 #define FTDI_LUMEL_PD12_PID 0x6002 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 +/* |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 + * Custom USB adapters made by Falconia Partners LLC |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 + * for FreeCalypso project, ID codes allocated to Falconia by FTDI. |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 + */ |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 +#define FTDI_FALCONIA_JTAG_BUF_PID 0x7150 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 +#define FTDI_FALCONIA_JTAG_UNBUF_PID 0x7151 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 + |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 /* Cyber Cortex AV by Fabulous Silicon (http://fabuloussilicon.com) */ |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 #define CYBER_CORTEX_AV_PID 0x8698 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 -- |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 2.9.0 |
d7a1e7a6d6ba
linux-patch: current best offering of minpatch-*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 |