diff mbox series

USB:serial:option:add Netprisma LCUK54 series modules

Message ID LV3PR22MB5104866DF8BB6C75AED1D379B0F92@LV3PR22MB5104.namprd22.prod.outlook.com (mailing list archive)
State New, archived
Headers show
Series USB:serial:option:add Netprisma LCUK54 series modules | expand

Commit Message

mank June 5, 2024, 12:50 a.m. UTC
Add support for Netprisma LCUK54 series modules.

LCUK54-WRD-LWW(0x3731/0x0101): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL
LCUK54-WRD-LCN(0x3731/0x0106): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL
LCUK54-WWD-LCN(0x3731/0x0115): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL
LCUK54-WWD-LWW(0x3731/0x0116): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL

Above products use the exact same interface layout and option
driver is for interfaces DIAG, NMEA and AT.

T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  5 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=3731 ProdID=0101 Rev= 5.04
S:  Manufacturer=NetPrisma
S:  Product=LCUK54-WRD
S:  SerialNumber=b6250c36
C:* #Ifs= 8 Cfg#= 1 Atr=a0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 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=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 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=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none)
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
E:  Ad=8f(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Signed-off-by: Mank Wang <mank@netprisma.us>
---
 drivers/usb/serial/option.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Johan Hovold June 27, 2024, 7:24 a.m. UTC | #1
On Wed, Jun 05, 2024 at 12:50:12AM +0000, mank wrote:
> Add support for Netprisma LCUK54 series modules.
> 
> LCUK54-WRD-LWW(0x3731/0x0101): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL
> LCUK54-WRD-LCN(0x3731/0x0106): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL
> LCUK54-WWD-LCN(0x3731/0x0115): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL
> LCUK54-WWD-LWW(0x3731/0x0116): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL

Just out of curiosity, what is the difference between the variants here?

> Above products use the exact same interface layout and option
> driver is for interfaces DIAG, NMEA and AT.
> 
> T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  5 Spd=480  MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=3731 ProdID=0101 Rev= 5.04
> S:  Manufacturer=NetPrisma
> S:  Product=LCUK54-WRD
> S:  SerialNumber=b6250c36
> C:* #Ifs= 8 Cfg#= 1 Atr=a0 MxPwr=500mA
> A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
> I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
> E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
> I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
> I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
> E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 2 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
> E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
> I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
> E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 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=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 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=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none)
> E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
> E:  Ad=8f(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> 
> Signed-off-by: Mank Wang <mank@netprisma.us>

Can you fix up you mailer and resend so that your full name is included
in From?

I think checkpatch.pl would warn about this.

> ---
>  drivers/usb/serial/option.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index 8a5846d4adf6..0e8837f37ccd 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -622,6 +622,14 @@ static void option_instat_callback(struct urb *urb);
>  /* MeiG Smart SLM320 based on UNISOC UIS8910 */
>  #define MEIGSMART_PRODUCT_SLM320		0x4d41
>  
> +/* Netprisma Wireless products */
> +#define NETPRISMA_VENDOR_ID			0x3731
> +/* These Netprisma products use Netprisma's vendor ID */
> +#define NETPRISMA_PRODUCT_LCUK54WRD_LWW	0x0101
> +#define NETPRISMA_PRODUCT_LCUK54WRD_LCN	0x0106
> +#define NETPRISMA_PRODUCT_LCUK54WWD_LCN	0x0115
> +#define NETPRISMA_PRODUCT_LCUK54WWD_LWW	0x0116

Please drop these in favour of using constants with a comment after the
first line for the product, for example:

> +	{ USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0101, 0xff, 0xff, 0x30) },	/* NetPrisma LCUK54 WRD/LWW */

Johan
diff mbox series

Patch

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 8a5846d4adf6..0e8837f37ccd 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -622,6 +622,14 @@  static void option_instat_callback(struct urb *urb);
 /* MeiG Smart SLM320 based on UNISOC UIS8910 */
 #define MEIGSMART_PRODUCT_SLM320		0x4d41
 
+/* Netprisma Wireless products */
+#define NETPRISMA_VENDOR_ID			0x3731
+/* These Netprisma products use Netprisma's vendor ID */
+#define NETPRISMA_PRODUCT_LCUK54WRD_LWW	0x0101
+#define NETPRISMA_PRODUCT_LCUK54WRD_LCN	0x0106
+#define NETPRISMA_PRODUCT_LCUK54WWD_LCN	0x0115
+#define NETPRISMA_PRODUCT_LCUK54WWD_LWW	0x0116
+
 /* Device flags */
 
 /* Highest interface number which can be used with NCTRL() and RSVD() */
@@ -2328,6 +2336,18 @@  static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM320, 0xff, 0, 0) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WRD_LWW, 0xff, 0xff, 0x30) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WRD_LWW, 0xff, 0x00, 0x40) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WRD_LWW, 0xff, 0xff, 0x40) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WRD_LCN, 0xff, 0xff, 0x30) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WRD_LCN, 0xff, 0x00, 0x40) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WRD_LCN, 0xff, 0xff, 0x40) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WWD_LCN, 0xff, 0xff, 0x30) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WWD_LCN, 0xff, 0x00, 0x40) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WWD_LCN, 0xff, 0xff, 0x40) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WWD_LWW, 0xff, 0xff, 0x30) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WWD_LWW, 0xff, 0x00, 0x40) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(NETPRISMA_VENDOR_ID, NETPRISMA_PRODUCT_LCUK54WWD_LWW, 0xff, 0xff, 0x40) },
 	{ } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);