From patchwork Tue Nov 21 21:05:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Fragoso X-Patchwork-Id: 13463565 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hotmail.com header.i=@hotmail.com header.b="baKQmC6F" Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04olkn2050.outbound.protection.outlook.com [40.92.46.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDF5A1A2; Tue, 21 Nov 2023 13:05:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ug/dd1U9aau40nh57CvqGBYwJNTwyzw1d4A3cshljVdYEI8dx/dTQUpaOuoAMKwdQLo/UcZ0fvGsg5lZqxJFXSMHZSjB9KVxYLcRjNID2TARk4gENWxh4kscjDu3FbY4SQgVN7Zfgg6SsUcqx85uUjBT07vhsrpDOHbkuhiz1naQwnitUukP9QhSEeauCtCA7rR8Dok+kp5HIffctZtB9E+Z1PAJ+jaZf4GdcLKxGix7IdSciMs3wbPAglzJexjk2xcuVkWOVPqClLGScjVbLUZeitiJ4F3Jfms7fbYkTb35jZeCgLV+oIuQ+m/fX0OdYsD/2oC2jtooWWUm8fZ+Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JeUdYAvZd9hmtZD/EA+fOv6da+hYcOPCOoOyCWOTWco=; b=Z457s306gYgIyu9Fxs6/5naTNOd5kqklwQcUkFFTX3BT6eq9Z2SsbzMfOFEw80/eYXONaiO88JRdAIUlIr0X063c15FK33TjI+eso7DwM+LtcUF4lVKmwKxFeBYGVE938a53+YXkTLqPvXvjlTTpViKUSZhwM9clb2NoTIYwRaX86/Vp2hyBLlGzSae9Ku71hf8j+kwFxSIMjFT8seZ+ev+yvcYj4llwcoo0oFWgjr2oScAoBTI0tXovYOMlSUrm+Sw/oXWXXLyuC9x8a96t4d3G45mTPIbowZ/RDv/+54W5N5sKjpuR2g1iYVLYYDUmfmrU9Vtt9O+PRdTdVAs5qQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JeUdYAvZd9hmtZD/EA+fOv6da+hYcOPCOoOyCWOTWco=; b=baKQmC6FR3brx009xPiICBVciGbE8Az3zupSrhNsgOwgf+b0XUzsrhNM9+r+9QCybqr73pKOqA5wGH0ZGESzA0+8zgFYM65tKENBaiE0TNBHqoiulR+mU6neWbAMY7eHvgshk6qtTZ2Y/tDLrgbTsCS8lxI6SslWMPn7IemZFvJBJBou355gpBsCsCvhe1dHu71EBV/ZsXFqdfoV+7l4pcJ/vJ8vJ0FGDzm953PzdUxNCJcy8qPfImbLnT067biISE9Iygb76CQ0l1Qyexyafo96hjtpjccNuzul/05+ZfiCxadhvDFKFhuUvCRYa0favISuT26tTL0AkWnZNAcTAA== Received: from PH0PR06MB7817.namprd06.prod.outlook.com (2603:10b6:510:ed::8) by PH0PR06MB7872.namprd06.prod.outlook.com (2603:10b6:510:aa::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.28; Tue, 21 Nov 2023 21:05:57 +0000 Received: from PH0PR06MB7817.namprd06.prod.outlook.com ([fe80::8837:cc08:d48d:74e4]) by PH0PR06MB7817.namprd06.prod.outlook.com ([fe80::8837:cc08:d48d:74e4%4]) with mapi id 15.20.7002.028; Tue, 21 Nov 2023 21:05:56 +0000 From: Victor Fragoso To: "johan@kernel.org" CC: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH v2] USB: serial: option: add Fibocom L7xx modules Thread-Topic: [PATCH v2] USB: serial: option: add Fibocom L7xx modules Thread-Index: AQHaHL6FSg+Jc3n8XUKpheSgkQBqXQ== Date: Tue, 21 Nov 2023 21:05:56 +0000 Message-ID: <39dd187fe27244f28fa729ce134d9d130147f2e1.camel@hotmail.com> Accept-Language: pt-BR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [MdqIxyQqFgPUZZVWYPr/4dQt+u4QFxWW] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR06MB7817:EE_|PH0PR06MB7872:EE_ x-ms-office365-filtering-correlation-id: 86a2228a-618e-405a-eabd-08dbead5a7ec x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HIaKXmAQoSgpqKYEyFimSw7cLzBaM+X5meqIxzL2ONAibpxJuvtk6MD6WWyPbIY9oy7TTQgme3gWsQfjoC97JE7ywm3kM2Ivu+UofDAO+KwfW8rCwsnC2vykvaGufkWvY9AuGPs99T2hQTjZpgiFu3ug+VvRevkp+4PkC29amQ18ZUGzdRQBM5USAGt2fIyoIdl5sX/muJECLwPN78QUbSSRyo/5sJkVrGHYYh/fRB45GR4iyo6kZVuBKgOXn3dLAz9sU8e+7Romw6ETNySWthZ/7Qv68in/fLlxLFE3FwF39xs8d+NoueP24b+lc3ECWH8BIq4JrQoZJyi/b4fHm7PYt66AHB8dpsLFEqNF3w6AqtZyKNmIdQnqfGdz99TOevixUq96KonE5WALg7e8fmQYjzUaxeT7MnHldh4dJqEAsH2kO1a+wqVf8JbVfyRpWnQ1R9FZPWWkcWyjNv3Vq+dq5QSFLaJ4JqVY1Hva7o5MT1lx7CfPC1yDY+xM0RBEm29eOFHy3e2gcEQ/mOGigx59D+pyg0dmtUkUKfwOjovCNslp27Rcsf/Z90nNKWcB x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?3PLPQ6KsX+T+smDFwrlzq7iBhLnB?= =?utf-8?q?kBZHw9+yMsV5FwcopQit/0+FG3sBBTOuzqa3QaAJ/tsh0l5kWTGeAarI0fWczV1CF?= =?utf-8?q?sM5RB1oFijH6y28mM8r8VWZyex647UVUVZXrulLQSghwRft02Kk/Jcl+Sf2STBEfU?= =?utf-8?q?Ec23HHi1DwRf4EGuSw1uHcKBGCjp09YolcPKO8MYViKDGu3LRChqM+LStbX1Nv3Qv?= =?utf-8?q?8ateT1RLlJV3HJtUekipa8/7mBrfQTbqT6L4ZJLEijzzUVmH/N4/Q3vXzXCq6gwh4?= =?utf-8?q?L12LHKjYliUMFd7lh9Ury5+XlJRtiiQVuTRua5lGbPR/vsantdrBhvi0XVg7T9We/?= =?utf-8?q?Qn/ey/N4VGjdBmBHEMLoWigHmAGcVKhNlhuWCWKX/ohPK7TIT2HLrtCDG6gijZamd?= =?utf-8?q?QFX3rHMuSqBFc29BvkwPVmr2A7vzU7HTlCYVLvTkW+HIv762RsMaQv74cjUGuje7b?= =?utf-8?q?O2ni9hHUaKnWyHPwo61y4T03lLICCi9PfaGyxL9SLgXFh21w+Lz1F1s72Uy13hTQT?= =?utf-8?q?+SS72Ha+kCK32U0yJfwsMVOx1Xr2RxSLlJswrDgJtmcTBMXLh1WaBElBhlisY5HGx?= =?utf-8?q?xsBX5wCGePhSQE5wJmO0gHcYgzNVq4gBHAC2mBSjq/d/lu8qhuvZNenX62AN+GqpJ?= =?utf-8?q?wEIo/Upy6sx8p7B5y9M0OACmJqG0sSxAbKyF+byPohqlzYxsubnWmw7ixQkX/XzJ0?= =?utf-8?q?PL5FHkxURvqsmhYQ+pu4F/PpQTZURBJrc/7IZ3sjExML6cID7FJhHxmvOgQ9Vy6MP?= =?utf-8?q?/Ps8foDhbSzON2MktwJCRsM/4LAXvRaCsWn5RdGdnhDpuCWtPwzD9eN03s68CPYQL?= =?utf-8?q?dfhK3kbmdWRuUfSgnGcBRE7QsU7gfDWDnzFgUPM6kiAJWUz5a9n8CfdNo/Jf4ajyW?= =?utf-8?q?Oopkz8p/ZDUcdvh9WY+2UCCTzvzS8x1TkPxP5goBHGyiFpkzpnXYL38bx/nzjsMgG?= =?utf-8?q?mEwA+3DXD7I3d0porUIuj+V0r1E2SPswcEk1tGhrxqOlBGTQ9cGKPqlcmnXUz9F1T?= =?utf-8?q?jIPSPnNuI4jggse+ylcKzOTTajOWgO/77pHJTi2K4AGrAQTMw9nAgRdPQA48cu9ag?= =?utf-8?q?/7mronMXOjMTXkoOfwNXf+aABxKUnRkqanP29pwk2gYYcC7QqxhHxykpQmDlZEawL?= =?utf-8?q?BUsBq/wt3H1PxYJgnME+jQ4wWEpq3CUHVs/gWfgLqTYaHNdWdNwzCjiGGelw4=3D?= Content-ID: Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-73ede.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR06MB7817.namprd06.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 86a2228a-618e-405a-eabd-08dbead5a7ec X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2023 21:05:56.8994 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR06MB7872 Add support for Fibocom L716-EU module series. L716-EU is a Fibocom module based on ZTE's V3E/V3T chipset. Device creates multiple interfaces when connected to PC as follows: - Network Interface: ECM or RNDIS (set by FW or AT Command) - ttyUSB0: AT port - ttyUSB1: Modem port - ttyUSB2: AT2 port - ttyUSB3: Trace port for log information - ADB: ADB port for debugging. ("Driver=usbfs" when ADB server enabled) Here are the outputs of lsusb and usb-devices: $ ls /dev/ttyUSB* /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3 usb-devices: L716-EU (ECM mode): T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 51 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2cb7 ProdID=0001 Rev= 1.00 S: Manufacturer=Fibocom,Incorporated S: Product=Fibocom Mobile Boardband S: SerialNumber=1234567890ABCDEF C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00 I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms L716-EU (RNDIS mode): T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 49 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2cb7 ProdID=0001 Rev= 1.00 S: Manufacturer=Fibocom,Incorporated S: Product=Fibocom Mobile Boardband S: SerialNumber=1234567890ABCDEF C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03 I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=ff Driver=rndis_host E: Ad=87(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Victor Fragoso Reviewed-by: Lars Melin --- Changes since v1: - Removed non-essential VID/PID to work with L716-EU tested module. - Added device entry comment according to tested module/modes. - Added according to VID/PID order - Commit message improved with more information about module ports. --- drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 45dcfaadaf98..f46df561cc7c 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -2249,6 +2249,7 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */ { USB_DEVICE_INTERFACE_CLASS(0x1782, 0x4d11, 0xff) }, /* Fibocom L610 (ECM/RNDIS mode) */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0001, 0xff, 0xff, 0xff) }, /* Fibocom L716-EU (ECM/RNDIS mode) */ { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */ .driver_info = RSVD(4) | RSVD(5) }, { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */