Skip to contentSkip to conversation

USB: qcaux: Add Motorola modem UARTs

PATCH Tony Lindgren 1 participant 1 message Dec 3, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

On Motorola Mapphone devices such as Droid 4 there are five USB ports that do not use the same layout as Gobi 1K/2K/etc devices listed in qcserial.c. So we should use qcaux.c or option.c as noted by Dan Williams <[email protected]>.

The ff/ff/ff interfaces seem to always be UARTs on Motorola devices. And we should not add interfaces with 0x0a class (CDC Data) as they are part of a multi-interface function like for example interface 0x22b8:0x4281 as noted by Bjørn Mork <[email protected]>.

The ttyUSB ports on Droid 4 seem to be:

ttyUSB0 DIAG, CQDM-capable
ttyUSB1 MUX or NMEA, no response
ttyUSB2 MUX or NMEA, no response
ttyUSB3 TCMD
ttyUSB4 AT-capable

To enable the MUX or NMEA ports, it seems that something needs to be done additionally to enable them, maybe via the DIAG or TCMD port. Who knows, maybe it's just some NVRAM setting.

Cc Bjørn Mork <[email protected]>
Cc Johan Hovold <[email protected]>
Cc Dan Williams <[email protected]>
Cc Marcel Partap <[email protected]>
Cc Merlijn Wajer <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Sebastian Reichel <[email protected]>
---
 drivers/usb/serial/qcaux.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/usb/serial/qcaux.c +9 -0
@@ -42,6 +42,12 @@
 #define LG_VENDOR_ID				0x1004
 #define LG_PRODUCT_VX4400_6000			0x6000 /* VX4400/VX6000/Rumor */
 
+/* Motorola devices */
+#define MOTOROLA_VENDOR_ID			0x22b8
+#define MOTOROLA_PRODUCT_MDM6600		0x2a70 /* MDM6600 on mapphone */
+#define MOTOROLA_PRODUCT_MDM9600		0x2e0a /* MDM9600 on mapphone */
+#define MOTOROLA_PRODUCT_MDM_FLASH		0x900e /* MDM UART flash mode */
+
 /* Sanyo devices */
 #define SANYO_VENDOR_ID				0x0474
 #define SANYO_PRODUCT_KATANA_LX			0x0754 /* SCP-3800 (Katana LX) */
@@ -60,6 +66,9 @@ static const struct usb_device_id id_table[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU550, 0xff, 0xff, 0x00) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDX650, 0xff, 0xff, 0x00) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(LG_VENDOR_ID, LG_PRODUCT_VX4400_6000, 0xff, 0xff, 0x00) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(MOTOROLA_VENDOR_ID, MOTOROLA_PRODUCT_MDM6600, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(MOTOROLA_VENDOR_ID, MOTOROLA_PRODUCT_MDM9600, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(MOTOROLA_VENDOR_ID, MOTOROLA_PRODUCT_MDM_FLASH, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(SANYO_VENDOR_ID, SANYO_PRODUCT_KATANA_LX, 0xff, 0xff, 0x00) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_U520, 0xff, 0x00, 0x00) },
 	{ USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfd, 0xff) },  /* NMEA */