Message ID | 20221227090109.115731-1-duke_xinanwen@163.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1297815wrt; Tue, 27 Dec 2022 01:08:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXsvv4tDwOjSyQ4HmjNMkDTqYjhsnxl8TNEwZwglDhClOJLCECqQGJSTrRiwIXg9If/N3wjQ X-Received: by 2002:a17:902:ce90:b0:192:8a1e:3293 with SMTP id f16-20020a170902ce9000b001928a1e3293mr4159182plg.63.1672132090517; Tue, 27 Dec 2022 01:08:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672132090; cv=none; d=google.com; s=arc-20160816; b=i3NvPOfj2jlLqWoA9GZU/agokqnN9f2bylMmOmo0CwBU7DHPARaUccv7UsEd4Eu3Ya IEsKpmyqhVZqpd3P7j6tjUxCOwVb7zDZyEzYIE4v91ZujJ/SWbN3ss+W5W2510YsMiys yErxz6iY0uL5PwkBlBc8hClY/gUn2Wjo047CxrDME56MtiaKYIdcdcAo354QwQF2onVx 9XA8G1k2MCbRLCPQw+Xp1u6veeEtDHAscYuQ2jtmXJoS373ne6MXvla2Ici8CbT+OXQ0 AxPFCoGXW+RoYQbAe+pv2aZmp41QUKrBl52MY40bcu3BrUj6GkNsJCx5C8Ww3a/hvOV6 dPMg== 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=EuoPMJzmyay0f+IIM34l3uXr5LmOon9KnbZ7ePTRmwU=; b=Ewa0ZFQFfh5XIIcjU1nJLi8BwxCEy/3Awg+CpuCT1LZQ18mvc5Y8X8BSaD9nPLMcWJ e+ZEifYaKPcvRPPgJYKcHlUbLPFmsUKofeivDS1pJAIoeQtHTsTA87pXvvTMUbaSwL9R 3MsYAkzQ50MhPeeL94zewdSr2/Also/9mGGOcbzQIQUZHLI1Wf/JTU0+fWvT5B5Z+BoJ 2KD/UxDaHkzgbiecBIEQEZgvI9XWrKeQA88VEk0PUMA0s+axV2K4i+fDzXCoOx80NsNm DyADo8zObEzwirf31Rss1rDf5RIuHV/mjqk4u05cpexFDiXx9Lp5IMSQ1boPiYqOLXYq gDVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=NYOr+WTF; 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 l16-20020a170903121000b00189d0fa14desi14255975plh.620.2022.12.27.01.07.57; Tue, 27 Dec 2022 01:08:10 -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=NYOr+WTF; 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 S229593AbiL0JES (ORCPT <rfc822;eddaouddi.ayoub@gmail.com> + 99 others); Tue, 27 Dec 2022 04:04:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbiL0JEQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 27 Dec 2022 04:04:16 -0500 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.214]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 10F0964EF; Tue, 27 Dec 2022 01:04:12 -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=EuoPMJzmyay0f+IIM34l3uXr5LmOon9KnbZ7ePTRmwU=; b=NYOr+WTFpJ57SpJgd6q7PmHtN/kPCA2KLyzox/AyyOpjgmIwk5Jv2Vl4Owu0Di dP6ZoqxQNROPmaX8fQkwAjcpNdzrruFS4rWICwG8UGrLIlmryF5dvQrvXVD1KU8M jK5TUMRGBsXazPP34GEINOONtykwZnQ9Cnau1F0K/24OY= Received: from ubuntu.localdomain (unknown [220.180.239.55]) by zwqz-smtp-mta-g4-0 (Coremail) with SMTP id _____wDn7zestKpjp5xPAA--.22528S2; Tue, 27 Dec 2022 17:02:38 +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, 27 Dec 2022 01:01:08 -0800 Message-Id: <20221227090109.115731-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: _____wDn7zestKpjp5xPAA--.22528S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxCF13ur1kur17ZF15GFyUZFb_yoW5AF4UpF 1UAFWavFy8XF47W3ZIkrs5uFW5Kan7Kr47CanrZw4fWFyxArs3tr1jyrZ5tr129F4Fyr4S vws8Gw47Ga4kJ37anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pRZYFPUUUUU= X-Originating-IP: [220.180.239.55] X-CM-SenderInfo: 5gxnvsp0lqt0xzhqqiywtou0bp/1tbiPRfke2I0UxwcTgAAs+ 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?1753357579203743889?= X-GMAIL-MSGID: =?utf-8?q?1753357579203743889?= |
Series |
USB: serial: option: add Quectel EM05CN modem
|
|
Commit Message
Duke Xin(辛安文)
Dec. 27, 2022, 9:01 a.m. UTC
Add support for the following Quectel EM05CN composition:
0x0310: 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=0310 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 27, 2022 at 01:01:08AM -0800, Duke Xin(辛安文) wrote: > Add support for the following Quectel EM05CN composition: > > 0x0310: 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=0310 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..0f5c479fa678 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_SG 0x0310 This one should go before 0x0311. > #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_SG, 0xff), > + .driver_info = RSVD(6) | ZLP }, Looks like you don't have an interface #6 here either. If this is something that is only needed in some mode or similar, then please mention that in the commit message. > { 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..0f5c479fa678 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_SG 0x0310 #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_SG, 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) },