ramips: add support for ZTE MF283+
[openwrt/openwrt.git] / target / linux / generic / backport-5.10 / 830-v5.12-0001-net-usb-qmi_wwan-support-ZTE-P685M-modem.patch
1 From 88eee9b7b42e69fb622ddb3ff6f37e8e4347f5b2 Mon Sep 17 00:00:00 2001
2 From: Lech Perczak <lech.perczak@gmail.com>
3 Date: Tue, 23 Feb 2021 19:34:56 +0100
4 Subject: net: usb: qmi_wwan: support ZTE P685M modem
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Now that interface 3 in "option" driver is no longer mapped, add device
10 ID matching it to qmi_wwan.
11
12 The modem is used inside ZTE MF283+ router and carriers identify it as
13 such.
14 Interface mapping is:
15 0: QCDM, 1: AT (PCUI), 2: AT (Modem), 3: QMI, 4: ADB
16
17 T: Bus=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
18 D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
19 P: Vendor=19d2 ProdID=1275 Rev=f0.00
20 S: Manufacturer=ZTE,Incorporated
21 S: Product=ZTE Technologies MSM
22 S: SerialNumber=P685M510ZTED0000CP&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&0
23 C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
24 I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
25 E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
26 E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
27 I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
28 E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
29 E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
30 E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
31 I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
32 E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
33 E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
34 E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
35 I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
36 E: Ad=87(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
37 E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
38 E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
39 I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
40 E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
41 E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
42
43 Acked-by: Bjørn Mork <bjorn@mork.no>
44 Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
45 Link: https://lore.kernel.org/r/20210223183456.6377-1-lech.perczak@gmail.com
46 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
47 ---
48 drivers/net/usb/qmi_wwan.c | 1 +
49 1 file changed, 1 insertion(+)
50
51 --- a/drivers/net/usb/qmi_wwan.c
52 +++ b/drivers/net/usb/qmi_wwan.c
53 @@ -1258,6 +1258,7 @@ static const struct usb_device_id produc
54 {QMI_FIXED_INTF(0x19d2, 0x1255, 4)},
55 {QMI_FIXED_INTF(0x19d2, 0x1256, 4)},
56 {QMI_FIXED_INTF(0x19d2, 0x1270, 5)}, /* ZTE MF667 */
57 + {QMI_FIXED_INTF(0x19d2, 0x1275, 3)}, /* ZTE P685M */
58 {QMI_FIXED_INTF(0x19d2, 0x1401, 2)},
59 {QMI_FIXED_INTF(0x19d2, 0x1402, 2)}, /* ZTE MF60 */
60 {QMI_FIXED_INTF(0x19d2, 0x1424, 2)},