1 From 128524b9db3e4f4245226852bee771bd03db75be Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
3 Date: Tue, 3 Nov 2015 11:01:42 +0100
4 Subject: [PATCH 1/2] USB: qcserial: Add support for Quectel EC20 Mini PCIe
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 It seems like this device has same vendor and product IDs as G2K
11 devices, but it has different number of interfaces(4 vs 5) and also
12 different interface layout which makes it currently unusable:
14 usbcore: registered new interface driver qcserial
15 usbserial: USB Serial support registered for Qualcomm USB modem
16 usb 2-1.2: unknown number of interfaces: 5
20 Bus 002 Device 003: ID 05c6:9215 Qualcomm, Inc. Acer Gobi 2000 Wireless
25 bDeviceClass 0 (Defined at Interface level)
29 idVendor 0x05c6 Qualcomm, Inc.
30 idProduct 0x9215 Acer Gobi 2000 Wireless Modem
32 iManufacturer 1 Quectel
33 iProduct 2 Quectel LTE Module
36 Configuration Descriptor:
48 Signed-off-by: Petr Štetiar <ynezz@true.cz>
50 drivers/usb/serial/qcserial.c | 39 +++++++++++++++++++++++++++++++++++++++
51 1 file changed, 39 insertions(+)
53 --- a/drivers/usb/serial/qcserial.c
54 +++ b/drivers/usb/serial/qcserial.c
56 #define DRIVER_AUTHOR "Qualcomm Inc"
57 #define DRIVER_DESC "Qualcomm USB Serial driver"
59 +#define QUECTEL_EC20_IDPRODUCT 0x9215
61 /* standard device layouts supported by this driver */
62 enum qcserial_layouts {
63 QCSERIAL_G2K = 0, /* Gobi 2000 */
64 @@ -171,6 +173,38 @@ static const struct usb_device_id id_tab
66 MODULE_DEVICE_TABLE(usb, id_table);
68 +static int handle_quectel_ec20(struct device *dev, int ifnum)
73 + * Quectel EC20 Mini PCIe LTE module layout:
74 + * 0: DM/DIAG (use libqcdm from ModemManager for communication)
76 + * 2: AT-capable modem port
77 + * 3: Modem interface
82 + dev_dbg(dev, "Quectel EC20 DM/DIAG interface found\n");
85 + dev_dbg(dev, "Quectel EC20 NMEA GPS interface found\n");
89 + dev_dbg(dev, "Quectel EC20 Modem port found\n");
92 + /* Don't claim the QMI/net interface */
100 static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
102 struct usb_host_interface *intf = serial->interface->cur_altsetting;
103 @@ -239,6 +273,11 @@ static int qcprobe(struct usb_serial *se
107 + if (nintf == 5 && id->idProduct == QUECTEL_EC20_IDPRODUCT) {
108 + altsetting = handle_quectel_ec20(dev, ifnum);
113 * Gobi 2K+ USB layout: