* [PATCH] Add Marvell ML352 to drivers/usb/serial/option.c
@ 2025-06-18 8:06 Michael Wyraz
2025-06-18 14:27 ` Johan Hovold
2026-10-04 9:43 ` [PATCH v2] USB: serial: option: add support for ASR 1286:4e3c modem Michael Wyraz
0 siblings, 2 replies; 6+ messages in thread
From: Michael Wyraz @ 2025-06-18 8:06 UTC (permalink / raw)
To: linux-usb
Add the device id of the Marvell ML352 to option.c so that the
device is recognized as usb-serial device.
Signed-off-by: Michael Wyraz <michael@wyraz.de>
---
drivers/usb/serial/option.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 5cd26dac2069..3bfdab641369 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -619,6 +619,10 @@ static void option_instat_callback(struct urb *urb);
/* Luat Air72*U series based on UNISOC UIS8910 uses UNISOC's vendor ID */
#define LUAT_PRODUCT_AIR720U 0x4e00
+/* Marvell products */
+#define MARVELL_VENDOR_ID 0x1286
+#define MARVELL_PRODUCT_ML352 0x4e3c
+
/* Device flags */
/* Highest interface number which can be used with NCTRL() and RSVD() */
@@ -2434,6 +2438,7 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
{ 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(MARVELL_VENDOR_ID, MARVELL_PRODUCT_ML352) },
{ USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0530, 0xff), /* TCL IK512 MBIM */
.driver_info = NCTRL(1) },
{ USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0640, 0xff), /* TCL IK512 ECM */
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Add Marvell ML352 to drivers/usb/serial/option.c
2025-06-18 8:06 [PATCH] Add Marvell ML352 to drivers/usb/serial/option.c Michael Wyraz
@ 2025-06-18 14:27 ` Johan Hovold
2025-09-12 6:54 ` Michael Wyraz
2026-10-04 9:43 ` [PATCH v2] USB: serial: option: add support for ASR 1286:4e3c modem Michael Wyraz
1 sibling, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2025-06-18 14:27 UTC (permalink / raw)
To: Michael Wyraz; +Cc: linux-usb
On Wed, Jun 18, 2025 at 10:06:15AM +0200, Michael Wyraz wrote:
> Add the device id of the Marvell ML352 to option.c so that the
> device is recognized as usb-serial device.
>
> Signed-off-by: Michael Wyraz <michael@wyraz.de>
Thanks for the patch. Looks good, but we may not want to bind to every
interface of the device.
Can you please post the output of 'usb-devices' for this device? I
assume it has more than one interface, do what each interface is used
for?
If you end up resending, please use the common prefix in Subject, for
example:
USB: serial: option: add support for Marvell ML352
(e.g. as can been seen by running 'git log --oneline' on the files
you're changing).
Johan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add Marvell ML352 to drivers/usb/serial/option.c
2025-06-18 14:27 ` Johan Hovold
@ 2025-09-12 6:54 ` Michael Wyraz
2025-09-18 9:57 ` Johan Hovold
0 siblings, 1 reply; 6+ messages in thread
From: Michael Wyraz @ 2025-09-12 6:54 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-usb
Hello Johan,
sorry, I totally missed this mail. "usb-devices" is not available on
that device. Hope this does it too:
lsusb -d 1286:4e3c -v
Bus 001 Device 002: ID 1286:4e3c ASR Mobile Composite Device Bus
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239
bDeviceSubClass 2
bDeviceProtocol 1
bMaxPacketSize0 64
idVendor 0x1286
idProduct 0x4e3c
bcdDevice 1.00
iManufacturer 1 ASR
iProduct 2 Mobile Composite Device Bus
iSerial 3 200806006809080000
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x00c4
bNumInterfaces 5
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 224
bFunctionSubClass 1
bFunctionProtocol 3
iFunction 5 Mobile RNDIS Network Adapter
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 224
bInterfaceSubClass 1
bInterfaceProtocol 3
iInterface 5 Mobile RNDIS Network Adapter
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 05 24 01 00 01
** UNRECOGNIZED: 04 24 02 00
** UNRECOGNIZED: 05 24 06 00 01
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 16
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 5 Mobile RNDIS Network Adapter
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 8 Mobile Diag Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 11 Mobile AT Interface
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 05 24 01 00 00
** UNRECOGNIZED: 04 24 02 02
** UNRECOGNIZED: 05 24 06 00 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8c EP 12 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8e EP 14 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x0d EP 13 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 11 Mobile AT Interface
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 05 24 01 00 00
** UNRECOGNIZED: 04 24 02 02
** UNRECOGNIZED: 05 24 06 00 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8a EP 10 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 16
bNumConfigurations 1
Device Status: 0x0001
Self Powered
Am 18.06.25 um 16:27 schrieb Johan Hovold:
> On Wed, Jun 18, 2025 at 10:06:15AM +0200, Michael Wyraz wrote:
>> Add the device id of the Marvell ML352 to option.c so that the
>> device is recognized as usb-serial device.
>>
>> Signed-off-by: Michael Wyraz <michael@wyraz.de>
> Thanks for the patch. Looks good, but we may not want to bind to every
> interface of the device.
>
> Can you please post the output of 'usb-devices' for this device? I
> assume it has more than one interface, do what each interface is used
> for?
>
> If you end up resending, please use the common prefix in Subject, for
> example:
>
> USB: serial: option: add support for Marvell ML352
>
> (e.g. as can been seen by running 'git log --oneline' on the files
> you're changing).
>
> Johan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add Marvell ML352 to drivers/usb/serial/option.c
2025-09-12 6:54 ` Michael Wyraz
@ 2025-09-18 9:57 ` Johan Hovold
0 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2025-09-18 9:57 UTC (permalink / raw)
To: Michael Wyraz; +Cc: linux-usb
[ Please avoid top-posting when replying on the lists. ]
On Fri, Sep 12, 2025 at 08:54:51AM +0200, Michael Wyraz wrote:
> sorry, I totally missed this mail. "usb-devices" is not available on
> that device. Hope this does it too:
Sure, thanks.
> lsusb -d 1286:4e3c -v
> Bus 001 Device 002: ID 1286:4e3c ASR Mobile Composite Device Bus
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 0
> bAlternateSetting 0
> bNumEndpoints 1
> bInterfaceClass 224
> bInterfaceSubClass 1
> bInterfaceProtocol 3
> iInterface 5 Mobile RNDIS Network Adapter
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 0
> bNumEndpoints 2
> bInterfaceClass 10
> bInterfaceSubClass 0
> bInterfaceProtocol 0
> iInterface 5 Mobile RNDIS Network Adapter
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 2
> bAlternateSetting 0
> bNumEndpoints 2
> bInterfaceClass 255
> bInterfaceSubClass 0
> bInterfaceProtocol 0
> iInterface 8 Mobile Diag Interface
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 3
> bAlternateSetting 0
> bNumEndpoints 3
> bInterfaceClass 255
> bInterfaceSubClass 0
> bInterfaceProtocol 0
> iInterface 11 Mobile AT Interface
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 4
> bAlternateSetting 0
> bNumEndpoints 3
> bInterfaceClass 255
> bInterfaceSubClass 0
> bInterfaceProtocol 0
> iInterface 11 Mobile AT Interface
The device has five interfaces and the serial driver should only bind to
the last three so you should use USB_DEVICE_INTERFACE_CLASS() and only
match on the vendor class (0xff).
Please also include a description of what each interface is used for in
the commit message. Including a compact usb-devices output (it's just a
script you can copy to the host) would be good. Otherwise you can add a
link to your last mail in the archives:
Link: https://lore.kernel.org/all/d12635f9-9706-4dbd-8adb-d673c6a77202@wyraz.de/
> Am 18.06.25 um 16:27 schrieb Johan Hovold:
> > On Wed, Jun 18, 2025 at 10:06:15AM +0200, Michael Wyraz wrote:
> >> Add the device id of the Marvell ML352 to option.c so that the
> >> device is recognized as usb-serial device.
> >>
> >> Signed-off-by: Michael Wyraz <michael@wyraz.de>
> > Thanks for the patch. Looks good, but we may not want to bind to every
> > interface of the device.
> >
> > Can you please post the output of 'usb-devices' for this device? I
> > assume it has more than one interface, do what each interface is used
> > for?
And remember to update Subject when sending your v2:
> > If you end up resending, please use the common prefix in Subject, for
> > example:
> >
> > USB: serial: option: add support for Marvell ML352
> >
> > (e.g. as can been seen by running 'git log --oneline' on the files
> > you're changing).
Johan
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] USB: serial: option: add support for ASR 1286:4e3c modem
2025-06-18 8:06 [PATCH] Add Marvell ML352 to drivers/usb/serial/option.c Michael Wyraz
2025-06-18 14:27 ` Johan Hovold
@ 2026-10-04 9:43 ` Michael Wyraz
2026-10-09 7:54 ` Johan Hovold
1 sibling, 1 reply; 6+ messages in thread
From: Michael Wyraz @ 2026-10-04 9:43 UTC (permalink / raw)
To: linux-usb; +Cc: johan, Michael Wyraz
The ASR modem used in the Tuoshi LT22M exposes an RNDIS function on
interfaces 0 and 1, a diagnostic port on interface 2, and AT ports on
interfaces 3 and 4. Match only the vendor-specific serial interfaces
so option does not bind to the RNDIS function.
Link: https://lore.kernel.org/all/d12635f9-9706-4dbd-8adb-d673c6a77202@wyraz.de/
Signed-off-by: Michael Wyraz <michael@wyraz.de>
---
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 828b1be..f95788f 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2556,6 +2556,7 @@ 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, UNISOC_PRODUCT_UIS7720, 0xff, 0, 0) },
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) },
+ { USB_DEVICE_INTERFACE_CLASS(0x1286, 0x4e3c, 0xff) }, /* ASR modem */
{ USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0530, 0xff), /* TCL IK512 MBIM */
.driver_info = NCTRL(1) },
{ USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0640, 0xff), /* TCL IK512 ECM */
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] USB: serial: option: add support for ASR 1286:4e3c modem
2026-10-04 9:43 ` [PATCH v2] USB: serial: option: add support for ASR 1286:4e3c modem Michael Wyraz
@ 2026-10-09 7:54 ` Johan Hovold
0 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2026-10-09 7:54 UTC (permalink / raw)
To: Michael Wyraz; +Cc: linux-usb
On Sun, Oct 04, 2026 at 11:43:21AM +0200, Michael Wyraz wrote:
> The ASR modem used in the Tuoshi LT22M exposes an RNDIS function on
> interfaces 0 and 1, a diagnostic port on interface 2, and AT ports on
> interfaces 3 and 4. Match only the vendor-specific serial interfaces
> so option does not bind to the RNDIS function.
>
> Link: https://lore.kernel.org/all/d12635f9-9706-4dbd-8adb-d673c6a77202@wyraz.de/
> Signed-off-by: Michael Wyraz <michael@wyraz.de>
> ---
Thanks for the v2. In the future when revising patches, please remember
to include a short change log here under the cut-off (---) line.
Now applied.
Johan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-09 7:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18 8:06 [PATCH] Add Marvell ML352 to drivers/usb/serial/option.c Michael Wyraz
2025-06-18 14:27 ` Johan Hovold
2025-09-12 6:54 ` Michael Wyraz
2025-09-18 9:57 ` Johan Hovold
2026-10-04 9:43 ` [PATCH v2] USB: serial: option: add support for ASR 1286:4e3c modem Michael Wyraz
2026-10-09 7:54 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox