* [PATCH v2] USB: serial: option: add Quectel EC200A module support
@ 2023-07-10 7:52 Mohsen Tahmasebi
2023-07-20 7:36 ` Johan Hovold
0 siblings, 1 reply; 4+ messages in thread
From: Mohsen Tahmasebi @ 2023-07-10 7:52 UTC (permalink / raw)
To: johan; +Cc: gregkh, linux-usb, linux-kernel, moh53n, Mostafa Ghofrani
Add Quectel EC200A "DIAG, AT, MODEM":
0x6005: ECM + RNDIS + DIAG + AT + MODEM
T: Bus=01 Lev=01 Prnt=02 Port=05 Cnt=01 Dev#= 8 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=2c7c ProdID=6005 Rev=03.18
S: Manufacturer=Android
S: Product=Android
S: SerialNumber=0000
C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
E: Ad=0c(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
Signed-off-by: Mohsen Tahmasebi <moh53n@moh53n.ir>
Tested-by: Mostafa Ghofrani <mostafaghrr@gmail.com>
---
V1 -> V2: Add proper changelog text
drivers/usb/serial/option.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 288a96a74266..ed4405efc18f 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -271,6 +271,7 @@ static void option_instat_callback(struct urb *urb);
#define QUECTEL_PRODUCT_EM061K_LWW 0x6008
#define QUECTEL_PRODUCT_EM061K_LCN 0x6009
#define QUECTEL_PRODUCT_EC200T 0x6026
+#define QUECTEL_PRODUCT_EC200A 0x6005
#define QUECTEL_PRODUCT_RM500K 0x7001
#define CMOTECH_VENDOR_ID 0x16d8
@@ -1228,6 +1229,7 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200U, 0xff, 0, 0) },
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200A, 0xff, 0, 0) },
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
--
2.41.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] USB: serial: option: add Quectel EC200A module support
2023-07-10 7:52 [PATCH v2] USB: serial: option: add Quectel EC200A module support Mohsen Tahmasebi
@ 2023-07-20 7:36 ` Johan Hovold
2023-07-20 11:30 ` Mohsen Tahmasebi
0 siblings, 1 reply; 4+ messages in thread
From: Johan Hovold @ 2023-07-20 7:36 UTC (permalink / raw)
To: Mohsen Tahmasebi; +Cc: gregkh, linux-usb, linux-kernel, Mostafa Ghofrani
On Mon, Jul 10, 2023 at 11:22:18AM +0330, Mohsen Tahmasebi wrote:
> Add Quectel EC200A "DIAG, AT, MODEM":
>
> 0x6005: ECM + RNDIS + DIAG + AT + MODEM
This device appears to only have four ports. Can you switch between ECM
and RNDIS using some AT command?
Does the device use the same PID in RNDIS mode?
Or is RNDIS perhaps not at all supported?
I've applied the patch after dropping RNDIS above and with the minor
changes below, but please clarify this so I can update the commit
message if needed (e.g. if this should have said "ECM/RNDIS" or
similar).
> T: Bus=01 Lev=01 Prnt=02 Port=05 Cnt=01 Dev#= 8 Spd=480 MxCh= 0
> D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
> P: Vendor=2c7c ProdID=6005 Rev=03.18
> S: Manufacturer=Android
> S: Product=Android
> S: SerialNumber=0000
> C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
> I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
> E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
> I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
> E: Ad=0c(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
> I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
>
> Signed-off-by: Mohsen Tahmasebi <moh53n@moh53n.ir>
> Tested-by: Mostafa Ghofrani <mostafaghrr@gmail.com>
> ---
> V1 -> V2: Add proper changelog text
>
> drivers/usb/serial/option.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index 288a96a74266..ed4405efc18f 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -271,6 +271,7 @@ static void option_instat_callback(struct urb *urb);
> #define QUECTEL_PRODUCT_EM061K_LWW 0x6008
> #define QUECTEL_PRODUCT_EM061K_LCN 0x6009
> #define QUECTEL_PRODUCT_EC200T 0x6026
> +#define QUECTEL_PRODUCT_EC200A 0x6005
Next time, please keep the PID defines sorted by value.
> #define QUECTEL_PRODUCT_RM500K 0x7001
>
> #define CMOTECH_VENDOR_ID 0x16d8
> @@ -1228,6 +1229,7 @@ static const struct usb_device_id option_ids[] = {
> { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200U, 0xff, 0, 0) },
> { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
> { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
> + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200A, 0xff, 0, 0) },
And the device-id entries sorted alphabetically.
> { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
>
> { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] USB: serial: option: add Quectel EC200A module support
2023-07-20 7:36 ` Johan Hovold
@ 2023-07-20 11:30 ` Mohsen Tahmasebi
2023-07-20 11:51 ` Johan Hovold
0 siblings, 1 reply; 4+ messages in thread
From: Mohsen Tahmasebi @ 2023-07-20 11:30 UTC (permalink / raw)
To: johan; +Cc: gregkh, linux-kernel, linux-usb, moh53n, mostafaghrr
Thanks for the tips Johan, I'll do better next time.
Yes, the device supports RNDIS mode with the same PID and you can switch with a AT command, so I think it should be ECM/RNDIS.
usb-devices output in RNDIS mode:
Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 6 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=2c7c ProdID=6005 Rev=03.18
S: Manufacturer=Android
S: Product=Android
S: SerialNumber=0000
C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
I: If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
usb-devices output in ECM mode:
Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 6 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=2c7c ProdID=6005 Rev=03.18
S: Manufacturer=Android
S: Product=Android
S: SerialNumber=0000
C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
I: If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] USB: serial: option: add Quectel EC200A module support
2023-07-20 11:30 ` Mohsen Tahmasebi
@ 2023-07-20 11:51 ` Johan Hovold
0 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2023-07-20 11:51 UTC (permalink / raw)
To: Mohsen Tahmasebi; +Cc: gregkh, linux-kernel, linux-usb, mostafaghrr
On Thu, Jul 20, 2023 at 03:00:25PM +0330, Mohsen Tahmasebi wrote:
> Thanks for the tips Johan, I'll do better next time.
> Yes, the device supports RNDIS mode with the same PID and you can
> switch with a AT command, so I think it should be ECM/RNDIS.
Thanks for clarifying. I'll update the commit message accordingly.
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-20 11:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 7:52 [PATCH v2] USB: serial: option: add Quectel EC200A module support Mohsen Tahmasebi
2023-07-20 7:36 ` Johan Hovold
2023-07-20 11:30 ` Mohsen Tahmasebi
2023-07-20 11:51 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome