Message ID | 20221214043546.10339-1-duke_xinanwen@163.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp5352wrn; Tue, 13 Dec 2022 20:44:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf5pWtRn2hCz4kG0Re+xD+tEivs7h9ZrE3FRLDuRIBAmqYGyt6t3EjwSzRP6jUAyvllJbEGb X-Received: by 2002:a05:6402:25c7:b0:461:c5b4:a7d0 with SMTP id x7-20020a05640225c700b00461c5b4a7d0mr19981891edb.24.1670993072385; Tue, 13 Dec 2022 20:44:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670993072; cv=none; d=google.com; s=arc-20160816; b=I7MaqOXrmLeXHlDo7LDHw1OQT1+NgILuz/7mTWVCflk3K30q7yIVCDDNOFVQcsVwtZ +nElHheGE+kywIM7mTbZOPzSVVLvOAJZSIkQiqavdI6lGVn4LbvgycM69vRJgaepv8Ot peX5yGi2GEwemNpnDEJD0VGxPsj874gOvC1T0InOCDKkAawcu8kPxy/PqWIdnh1M+FQB 1GbhjvPACbB3D2c6JDCQUp5mAz3gEJxFzsWTtOXm6pw57qT4ZZLm4S8hJj2GMgzQh2z+ kfNmpBgJyPydij2Pg5fND5+myGeKEG38vGgvJ2ircBaCj1WKH7L5viz28t6XEfsKpMRb xaaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DY3lzO7T+2KwfHEYMzxI5g/KC2v9fHvLFJG9NFiNMIQ=; b=Uv4jLn26lrqdjM0fDmYWUxrC3CfI/kTzRxguGxhDq7RGQxUERGv1XaYgdEzUev4/sm cT3rw0TuyD257I6VdM1na8OqvCeUC+PdvcsL2246gaEL2y0qzq32UAwWQioF70wjYwlB 0iyfYGlRuHFG0I14WmZQiZPbWfMpzYXn8Gwo6mUy2GWVwAykrSmj1ruMpxjda+0Co+Gx 0l2WhE8YikwhtvC6ndnpZd0gfSpz/GV682RahzWzT1CC75ptmuORzdrNDmHUjPpNJ49d jf485NAySo/6wd8gMXJo3j3qHO/8YcAuVWZZ+nqO7uPlvbg0PVVMCtaL2VheUzR9Doed xL4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=Cs9SXwjN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne9-20020a1709077b8900b007c0c1cd86cfsi11467743ejc.36.2022.12.13.20.44.08; Tue, 13 Dec 2022 20:44:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=Cs9SXwjN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237184AbiLNEhG (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Tue, 13 Dec 2022 23:37:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237109AbiLNEhD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 13 Dec 2022 23:37:03 -0500 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.215]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D480121889; Tue, 13 Dec 2022 20:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version: Content-Type; bh=DY3lzO7T+2KwfHEYMzxI5g/KC2v9fHvLFJG9NFiNMIQ=; b=Cs9SXwjNmBmi3one8VOqIxAosgeOiZyNUWbJ7MZ6QVHYOU+3/bguVHfwTnNW8g 80I6+OfR4G3vKBh6zmp3eTyvYuk0ZCR1yrBHnE+WAhdcojUrBZKYhNzCXXUmBPXR ocAMxG+zk3kjgTFM21052/3LlAjsd1ctWGwrJ/awMDjkc= Received: from ubuntu.localdomain (unknown [220.180.239.56]) by zwqz-smtp-mta-g4-3 (Coremail) with SMTP id _____wCnP1HFUpljv+42AA--.37149S2; Wed, 14 Dec 2022 12:36:23 +0800 (CST) From: =?utf-8?b?RHVrZSBYaW4o6L6b5a6J5paHKQ==?= <duke_xinanwen@163.com> To: johan@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, jerry.meng@quectel.com, duke.xin@quectel.com, =?utf-8?b?RHVrZSBYaW4o6L6b?= =?utf-8?b?5a6J5paHKQ==?= <duke_xinanwen@163.com> Subject: [PATCH] USB: serial: option: add Quectel EM05CN modem Date: Tue, 13 Dec 2022 20:35:46 -0800 Message-Id: <20221214043546.10339-1-duke_xinanwen@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wCnP1HFUpljv+42AA--.37149S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxGFWfKFWUuFy7Xw4ruFWfKrg_yoW5AF17pF 1UAFWavFW8XF47u3ZIkrn5uFWFkan7Kr47CanrZw4fWFyxArs3tr1jyrZ5tr129F4Fyr4F van8G3y7Ga4kJ37anT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0p_6pvtUUUUU= X-Originating-IP: [220.180.239.56] X-CM-SenderInfo: 5gxnvsp0lqt0xzhqqiywtou0bp/1tbiVwfXe1etpZv2EAAAse X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752163232106595670?= X-GMAIL-MSGID: =?utf-8?q?1752163232106595670?= |
Series |
USB: serial: option: add Quectel EM05CN modem
|
|
Commit Message
Duke Xin(辛安文)
Dec. 14, 2022, 4:35 a.m. UTC
Add support for the following Quectel EM05CN composition:
0x0312: AT + MBIM + DIAG + NMEA + MODEM
usb-devices output:
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=2c7c ProdID=0312 Rev= 3.18
S: Manufacturer=Quectel
S: Product=Quectel EM05-CN
C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
A: FirstIf#= 1 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=32ms
I: If#= 2 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 2 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Signed-off-by: Duke Xin(辛安文) <duke_xinanwen@163.com>
---
drivers/usb/serial/option.c | 3 +++
1 file changed, 3 insertions(+)
Comments
On Tue, Dec 13, 2022 at 08:35:46PM -0800, Duke Xin(辛安文) wrote: > Add support for the following Quectel EM05CN composition: > > 0x0312: AT + MBIM + DIAG + NMEA + MODEM > > usb-devices output: > T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 > D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 > P: Vendor=2c7c ProdID=0312 Rev= 3.18 > S: Manufacturer=Quectel > S: Product=Quectel EM05-CN > C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA > A: FirstIf#= 1 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 > I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option > E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option > E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms > E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option > E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms > E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option > E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms > E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 1 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim > E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=32ms > I: If#= 2 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim > I:* If#= 2 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim > E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > > Signed-off-by: Duke Xin(辛安文) <duke_xinanwen@163.com> > --- > drivers/usb/serial/option.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c > index dee79c7d82d5..a35842be0ca0 100644 > --- a/drivers/usb/serial/option.c > +++ b/drivers/usb/serial/option.c > @@ -256,6 +256,7 @@ static void option_instat_callback(struct urb *urb); > #define QUECTEL_PRODUCT_EM05G 0x030a > #define QUECTEL_PRODUCT_EM060K 0x030b > #define QUECTEL_PRODUCT_EM05G_SG 0x0311 > +#define QUECTEL_PRODUCT_EM05CN 0x0312 Please use tabs for indenting the values and make sure they line up with the surrounding ones. > #define QUECTEL_PRODUCT_EM12 0x0512 > #define QUECTEL_PRODUCT_RM500Q 0x0800 > #define QUECTEL_PRODUCT_RM520N 0x0801 > @@ -1163,6 +1164,8 @@ static const struct usb_device_id option_ids[] = { > .driver_info = RSVD(6) | ZLP }, > { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_SG, 0xff), > .driver_info = RSVD(6) | ZLP }, > + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05CN, 0xff), > + .driver_info = RSVD(6) | ZLP }, Based on the usb-devices output above you have no interface #6 so this should not be needed, right? > { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0x00, 0x40) }, > { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x30) }, > { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x40) }, Johan
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index dee79c7d82d5..a35842be0ca0 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -256,6 +256,7 @@ static void option_instat_callback(struct urb *urb); #define QUECTEL_PRODUCT_EM05G 0x030a #define QUECTEL_PRODUCT_EM060K 0x030b #define QUECTEL_PRODUCT_EM05G_SG 0x0311 +#define QUECTEL_PRODUCT_EM05CN 0x0312 #define QUECTEL_PRODUCT_EM12 0x0512 #define QUECTEL_PRODUCT_RM500Q 0x0800 #define QUECTEL_PRODUCT_RM520N 0x0801 @@ -1163,6 +1164,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(6) | ZLP }, { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_SG, 0xff), .driver_info = RSVD(6) | ZLP }, + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05CN, 0xff), + .driver_info = RSVD(6) | ZLP }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0x00, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x30) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x40) },