linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: "Stefan Brüns" <stefan.bruens@rwth-aachen.de>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Daniele Palmas" <dnlplm@gmail.com>, "Bjørn Mork" <bjorn@mork.no>
Subject: Re: [PATCH v2] USB: serial: qcserial: Support for SDX55 based Sierra Wireless 5G modules
Date: Thu, 24 Jun 2021 09:28:59 +0200	[thread overview]
Message-ID: <YNQ0O0vhtpStp0n/@hovoldconsulting.com> (raw)
In-Reply-To: <20210611135842.14415-1-stefan.bruens@rwth-aachen.de>

[ +CC: Daniele and Bjørn ]

On Fri, Jun 11, 2021 at 03:58:41PM +0200, Stefan Brüns wrote:
> The devices exposes two different interface compositions:
> - QDL mode, single interface
> - MBIM mode, MBIM class compliant plus AT/DM(/ADB)
> 
> Current firmware versions (up to 01.07.19) do not expose an NMEA port.

We already have at least one SDX55 based modem (FN980) supported by the
option driver. Any particular reason why you chose to add it to qcserial
instead of option?

Note that the FN980 also needs the ZLP flag set in QDL (flashing) mode,
I'd assume this one needs it too.

Could you please also post the output of usb-devices (or lsusb -v) for
this device in MBIM mode?

> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
> ---
>  drivers/usb/serial/qcserial.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
> index 83da8236e3c8..4ff325a14c98 100644
> --- a/drivers/usb/serial/qcserial.c
> +++ b/drivers/usb/serial/qcserial.c
> @@ -26,12 +26,15 @@ enum qcserial_layouts {
>  	QCSERIAL_G1K = 1,	/* Gobi 1000 */
>  	QCSERIAL_SWI = 2,	/* Sierra Wireless */
>  	QCSERIAL_HWI = 3,	/* Huawei */
> +	QCSERIAL_SWI2 = 4,	/* Sierra Wireless */
>  };
>  
>  #define DEVICE_G1K(v, p) \
>  	USB_DEVICE(v, p), .driver_info = QCSERIAL_G1K
>  #define DEVICE_SWI(v, p) \
>  	USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI
> +#define DEVICE_SWI2(v, p) \
> +	USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI2
>  #define DEVICE_HWI(v, p) \
>  	USB_DEVICE(v, p), .driver_info = QCSERIAL_HWI
>  
> @@ -181,6 +184,10 @@ static const struct usb_device_id id_table[] = {
>  	{DEVICE_SWI(0x413c, 0x81d1)},   /* Dell Wireless 5818 */
>  	{DEVICE_SWI(0x413c, 0x81d2)},   /* Dell Wireless 5818 */
>  
> +	/* SDX55 based Sierra Wireless devices */
> +	{DEVICE_SWI2(0x1199, 0x90d2)},	/* Sierra Wireless EM919x QDL */
> +	{DEVICE_SWI2(0x1199, 0x90d3)},	/* Sierra Wireless EM919x */
> +
>  	/* Huawei devices */
>  	{DEVICE_HWI(0x03f0, 0x581d)},	/* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */
>  
> @@ -359,6 +366,28 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
>  			break;
>  		}
>  		break;
> +	case QCSERIAL_SWI2:
> +		/*
> +		 * Sierra Wireless SDX55 in MBIM mode:
> +		 * 0/1: MBIM Control/Data
> +		 * 3: AT-capable modem port
> +		 * 4: DM/DIAG (use libqcdm from ModemManager for communication)
> +		 * 5: ADB
> +		 */
> +		switch (ifnum) {
> +		case 3:
> +			dev_dbg(dev, "Modem port found\n");
> +			sendsetup = true;
> +			break;
> +		case 4:
> +			dev_dbg(dev, "DM/DIAG interface found\n");
> +			break;
> +		default:
> +			/* don't claim any unsupported interface */
> +			altsetting = -1;
> +			break;
> +		}
> +		break;
>  	case QCSERIAL_HWI:
>  		/*
>  		 * Huawei devices map functions by subclass + protocol

Johan

  reply	other threads:[~2021-06-24  7:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 13:45 [PATCH] Add support for SDX55 based Sierra Wireless 5G modules Stefan Brüns
2021-06-11 13:58 ` [PATCH v2] USB: serial: qcserial: Support " Stefan Brüns
2021-06-24  7:28   ` Johan Hovold [this message]
2021-06-24 11:15     ` Bjørn Mork
2021-07-01 16:28       ` Stefan Brüns
2021-07-02  7:32         ` Bjørn Mork
2021-07-01 16:41     ` Stefan Brüns
2021-07-02  8:27       ` Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YNQ0O0vhtpStp0n/@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=bjorn@mork.no \
    --cc=dnlplm@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stefan.bruens@rwth-aachen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).