From patchwork Mon Dec 3 01:34:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 10708527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 813D214E2 for ; Mon, 3 Dec 2018 01:34:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6497929B7D for ; Mon, 3 Dec 2018 01:34:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57BA429BBE; Mon, 3 Dec 2018 01:34:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77CFD29B7D for ; Mon, 3 Dec 2018 01:34:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725803AbeLCBeb (ORCPT ); Sun, 2 Dec 2018 20:34:31 -0500 Received: from muru.com ([72.249.23.125]:55830 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbeLCBeb (ORCPT ); Sun, 2 Dec 2018 20:34:31 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id ABB988105; Mon, 3 Dec 2018 01:34:30 +0000 (UTC) From: Tony Lindgren To: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, =?utf-8?q?Bj=C3=B8rn_Mork?= , Johan Hovold , Dan Williams , Marcel Partap , Merlijn Wajer , Pavel Machek , Sebastian Reichel , Tony Lingren Subject: [PATCH] USB: qcaux: Add Motorola modem UARTs Date: Sun, 2 Dec 2018 17:34:24 -0800 Message-Id: <20181203013424.7433-1-tony@atomide.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 . 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 . 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 Cc: Johan Hovold Cc: Dan Williams Cc: Marcel Partap Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lingren --- drivers/usb/serial/qcaux.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c --- a/drivers/usb/serial/qcaux.c +++ b/drivers/usb/serial/qcaux.c @@ -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 */