From nobody Wed Dec 17 21:13:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D73F3C04A94 for ; Wed, 16 Aug 2023 09:39:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243415AbjHPJjR (ORCPT ); Wed, 16 Aug 2023 05:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240373AbjHPJiy (ORCPT ); Wed, 16 Aug 2023 05:38:54 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.216]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A478213E; Wed, 16 Aug 2023 02:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=Byefe 1fj5C0m8WcjSH24Gccaa0QbjE0NaEHY/Q/2LzY=; b=N8MmdakF921D0mdgVy/ix ypGI5SaKP6qP+8YKNosx/n/yWRF7cG6lZaqvT2pzazUePuVuh40g03mDUzqpSOaT JalGh2YRwLIBvJEe1Y7wV7T71sxkOvERqKMFe67lzho6N1n6XpEqs+C0lDasQyhs 8BZfi3bJRByYRYtbYUYrCI= Received: from localhost.localdomain (unknown [223.104.66.110]) by zwqz-smtp-mta-g5-0 (Coremail) with SMTP id _____wDHVEH+mNxk8uPfDA--.57409S2; Wed, 16 Aug 2023 17:38:07 +0800 (CST) From: Slark Xiao To: johan@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Slark Xiao Subject: [PATCH] USB: serial: option: add FOXCONN vendor and T99W368/T99W373 product Date: Wed, 16 Aug 2023 17:37:55 +0800 Message-Id: <20230816093755.7059-1-slark_xiao@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: _____wDHVEH+mNxk8uPfDA--.57409S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxWw4rJr4rXry5Cr47WrW5GFg_yoWrWFWkpF y5CF4avrWDWw4rGF93trs5Ca95uan5Kry3CasrAw43uFyfAw4Dt348trWxXF9FgrsYqrsF vrWDG3y7Ka4DJrUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0JUjfOrUUUUU= X-Originating-IP: [223.104.66.110] X-CM-SenderInfo: xvod2y5b0lt0i6rwjhhfrp/xtbBDRPNZFaEQCWxiAAAs5 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" With the increase of the number of Foxconn devices, we add a vendor name for Foxconn. The difference of T99W368 and T99W373 is the chip solution. T99W368 is designed based on Qualcomm SDX65 and T99W373 is SDX62. Test evidence as below: T: Bus=3D01 Lev=3D02 Prnt=3D05 Port=3D00 Cnt=3D01 Dev#=3D 7 Spd=3D480 MxC= h=3D 0 D: Ver=3D 2.10 Cls=3Def(misc ) Sub=3D02 Prot=3D01 MxPS=3D64 #Cfgs=3D 1 P: Vendor=3D0489 ProdID=3De0f0 Rev=3D05.04 S: Manufacturer=3DFII S: Product=3DOLYMPIC USB WWAN Adapter S: SerialNumber=3D78ada8c4 C: #Ifs=3D 6 Cfg#=3D 1 Atr=3Da0 MxPwr=3D500mA I: If#=3D0x0 Alt=3D 0 #EPs=3D 1 Cls=3D02(commc) Sub=3D0e Prot=3D00 Driver= =3Dcdc_mbim I: If#=3D0x1 Alt=3D 1 #EPs=3D 2 Cls=3D0a(data ) Sub=3D00 Prot=3D02 Driver= =3Dcdc_mbim I: If#=3D0x2 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3Dff Prot=3D40 Driver= =3Doption I: If#=3D0x3 Alt=3D 0 #EPs=3D 1 Cls=3Dff(vend.) Sub=3Dff Prot=3Dff Driver= =3D(none) I: If#=3D0x4 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3Dff Prot=3D40 Driver= =3Doption I: If#=3D0x5 Alt=3D 0 #EPs=3D 2 Cls=3Dff(vend.) Sub=3Dff Prot=3D30 Driver= =3Doption T: Bus=3D01 Lev=3D02 Prnt=3D05 Port=3D00 Cnt=3D01 Dev#=3D 8 Spd=3D480 MxC= h=3D 0 D: Ver=3D 2.10 Cls=3Def(misc ) Sub=3D02 Prot=3D01 MxPS=3D64 #Cfgs=3D 1 P: Vendor=3D0489 ProdID=3De0ee Rev=3D05.04 S: Manufacturer=3DFII S: Product=3DOLYMPIC USB WWAN Adapter S: SerialNumber=3D78ada8d5 C: #Ifs=3D 6 Cfg#=3D 1 Atr=3Da0 MxPwr=3D500mA I: If#=3D0x0 Alt=3D 0 #EPs=3D 1 Cls=3D02(commc) Sub=3D0e Prot=3D00 Driver= =3Dcdc_mbim I: If#=3D0x1 Alt=3D 1 #EPs=3D 2 Cls=3D0a(data ) Sub=3D00 Prot=3D02 Driver= =3Dcdc_mbim I: If#=3D0x2 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3Dff Prot=3D40 Driver= =3Doption I: If#=3D0x3 Alt=3D 0 #EPs=3D 1 Cls=3Dff(vend.) Sub=3Dff Prot=3Dff Driver= =3D(none) I: If#=3D0x4 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3Dff Prot=3D40 Driver= =3Doption I: If#=3D0x5 Alt=3D 0 #EPs=3D 2 Cls=3Dff(vend.) Sub=3Dff Prot=3D30 Driver= =3Doption Both of them share the same port configuration: 0&1: MBIM, 2: Modem, 3:GNSS, 4:NMEA, 5:Diag GNSS port don't use serial driver. Signed-off-by: Slark Xiao --- drivers/usb/serial/option.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 8ac98e60fff5..405eba83640d 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -606,6 +606,14 @@ static void option_instat_callback(struct urb *urb); /* TOZED LT70-C based on UNISOC SL8563 uses UNISOC's vendor ID */ #define TOZED_PRODUCT_LT70C 0x4055 =20 +/* Foxconn products */ +#define FOXCONN_VENDOR_ID 0x0489 +#define FOXCONN_PRODUCT_T77W968 0xe0b4 +#define FOXCONN_PRODUCT_T77W968_ESIM 0xe0b5 +#define FOXCONN_PRODUCT_T99W265 0xe0db +#define FOXCONN_PRODUCT_T99W368 0xe0ee +#define FOXCONN_PRODUCT_T99W373 0xe0f0 + /* Device flags */ =20 /* Highest interface number which can be used with NCTRL() and RSVD() */ @@ -2226,11 +2234,15 @@ static const struct usb_device_id option_ids[] =3D { { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x13) }, { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x14) }, { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x1b) }, - { USB_DEVICE(0x0489, 0xe0b4), /* Foxconn T77W968 */ + { USB_DEVICE(FOXCONN_VENDOR_ID, FOXCONN_PRODUCT_T77W968), /* Foxconn = T77W968 */ .driver_info =3D RSVD(0) | RSVD(1) | RSVD(6) }, - { USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */ + { USB_DEVICE(FOXCONN_VENDOR_ID, FOXCONN_PRODUCT_T77W968_ESIM), /* Foxc= onn T77W968 ESIM */ .driver_info =3D RSVD(0) | RSVD(1) | RSVD(6) }, - { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 = MBIM */ + { USB_DEVICE_INTERFACE_CLASS(FOXCONN_VENDOR_ID, FOXCONN_PRODUCT_T99W265, = 0xff), /* Foxconn T99W265 MBIM */ + .driver_info =3D RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(FOXCONN_VENDOR_ID, FOXCONN_PRODUCT_T99W368, = 0xff), /* Foxconn T99W368 MBIM */ + .driver_info =3D RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(FOXCONN_VENDOR_ID, FOXCONN_PRODUCT_T99W373, = 0xff), /* Foxconn T99W373 MBIM */ .driver_info =3D RSVD(3) }, { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ .driver_info =3D RSVD(4) | RSVD(5) | RSVD(6) }, --=20 2.25.1