linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: "Alex Villacís Lasso" <a_villacis@palosanto.com>
Cc: David Frey <dpfrey@gmail.com>,
	linux-usb@vger.kernel.org, Pho Tran <pho.tran@silabs.com>,
	Tung Pham <tung.pham@silabs.com>,
	Hung.Nguyen@silabs.com
Subject: Re: cp210x module broken in 5.12.5 and 5.12.6, works in 5.11.21 (with bisection)
Date: Mon, 7 Jun 2021 18:45:46 +0200	[thread overview]
Message-ID: <YL5NOq2N8dNWDVbc@hovoldconsulting.com> (raw)
In-Reply-To: <7b8c5109-3654-7e65-0b94-f6b861ff78f5@palosanto.com>

On Mon, Jun 07, 2021 at 10:16:30AM -0500, Alex Villacís Lasso wrote:
> El 5/6/21 a las 05:13, Johan Hovold escribió:
> > On Fri, Jun 04, 2021 at 04:16:26PM -0700, David Frey wrote:
> >> I'm not sure if this matters, but I have been told that the failing
> >> boards have CP2102N chips with"A01" firmware.  I tried to install
> >> SIlicon Labs Simplicity Studio on Windows because I read that it would
> >> be able to identify the firmware version of the device, but I couldn't
> >> actually figure out how to find the information. If someone can tell
> >> me a way to get the firmware version, I can check to see if it's
> >> different between the device that does exhibit this failure and the
> >> one that doesn't.
> > That is definitely worth pursuing. The A01 is apparently EOLed and
> > there's a later A02 and possibly even A03:
> >
> > 	https://www.silabs.com/community/interface/knowledge-base.entry.html/2020/03/31/how_to_determinecp2102nrevisiona01vsa02-DCJI
> >
> > That page refers to that vendor tool "Simplicity Studio" as well as a
> > Windows library described by
> >
> > 	https://www.silabs.com/documents/public/application-notes/AN978-cp210x-usb-to-uart-api-specification.pdf
> >
> > that can be used to read out the firmware version on CP2102N and CP2108
> > (three bytes). We just need to figure out which vendor request the
> > library (and tool) uses and we could key off of this in the driver if
> > this turns out to be related to the firmware revision.
> 
> I modified the patch that added cp210x_dump_props() function, to dump 
> the raw buffer received using the print_hex_dump() kernel function. For 
> my device, I get this output:
> 
> jun 07 10:00:51 karlalex-asus kernel: cp210x propdata: 00000000: 42 00 
> 00 01 01 00 00 00 00 00 00 00 80 02 00 00  B...............
> jun 07 10:00:51 karlalex-asus kernel: cp210x propdata: 00000010: 80 02 
> 00 00 c0 c6 2d 10 01 00 00 00 3f 01 00 00  ......-.....?...
> jun 07 10:00:51 karlalex-asus kernel: cp210x propdata: 00000020: 7f 00 
> 00 00 ff ff 07 10 0f 00 07 1f 80 02 00 00  ................
> jun 07 10:00:51 karlalex-asus kernel: cp210x propdata: 00000030: 80 02 
> 00 00 00 00 00 00 00 00 00 00 33 00 2e 00  ............3...
> jun 07 10:00:51 karlalex-asus kernel: cp210x propdata: 00000040: 30 
> 00                                            0.
> jun 07 10:00:51 karlalex-asus kernel: cp210x ttyUSB0: wLength = 66
> jun 07 10:00:51 karlalex-asus kernel: cp210x ttyUSB0: ulMaxTxQueue = 640
> jun 07 10:00:51 karlalex-asus kernel: cp210x ttyUSB0: ulMaxRxQueue = 640
> jun 07 10:00:51 karlalex-asus kernel: cp210x ttyUSB0: ulProvSubType = 1
> jun 07 10:00:51 karlalex-asus kernel: cp210x ttyUSB0: ulProvCapabilities 
> = 0x13f
> jun 07 10:00:51 karlalex-asus kernel: cp210x ttyUSB0: ulSettableParams = 
> 0x7f
> jun 07 10:00:51 karlalex-asus kernel: cp210x ttyUSB0: ulCurrentTx-Queue 
> = 640
> jun 07 10:00:51 karlalex-asus kernel: cp210x ttyUSB0: ulCurrentRx-Queue 
> = 640
> 
> According to the datasheet at 
> https://www.silabs.com/documents/public/application-notes/AN571.pdf , 
> the data at offset 60 should be an Unicode string containing the device 
> vendor, with the last 3 characters denoting the version. The datasheet 
> gives an example of "SILABS USB Vx.y". However, my actual output decodes 
> to just "3.0". Is this enough for a blacklisting decision?

I'm afraid not; I have the same string encoded at offset 60 as you do:

	uniProvName = 33 00 2e 00 30 00 00 00 00 00 00 00 00 00 00

It seems we need help from Silabs here unless someone can reverse
engineer the Windows tool or library to determine the firmware version
request.

Johan

  reply	other threads:[~2021-06-07 16:45 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 17:38 cp210x module broken in 5.12.5 and 5.12.6, works in 5.11.21 (with bisection) Alex Villacís Lasso
2021-06-01  7:50 ` Johan Hovold
2021-06-01 14:51   ` Alex Villacís Lasso
2021-06-01 15:40     ` Johan Hovold
2021-06-01 17:18       ` Alex Villacís Lasso
2021-06-02 14:50         ` Johan Hovold
2021-06-02 15:54           ` Alex Villacís Lasso
2021-06-04 15:42             ` Johan Hovold
2021-06-04 18:25               ` Alex Villacís Lasso
2021-06-05 10:24                 ` Johan Hovold
2021-06-05 10:54                   ` Johan Hovold
2021-06-04 23:16               ` David Frey
2021-06-05 10:13                 ` Johan Hovold
2021-06-07 15:16                   ` Alex Villacís Lasso
2021-06-07 16:45                     ` Johan Hovold [this message]
2021-06-07 16:44                   ` David Frey
2021-06-07 16:52                     ` Johan Hovold
2021-06-07 18:02                       ` David Frey
2021-06-07 20:44                         ` David Frey
2021-06-07 23:50                           ` Alex Villacís Lasso
2021-06-08  9:10                             ` Tung Pham
2021-06-08  9:52                               ` Johan Hovold
2021-06-08  9:41                           ` Johan Hovold
2021-06-09 16:15                             ` [PATCH] USB: serial: cp210x: fix CP2102N-A01 modem control Johan Hovold
2021-06-09 17:00                               ` Alex Villacís Lasso
2021-06-10  7:23                                 ` Johan Hovold
2021-06-10 14:55                                   ` Alex Villacís Lasso

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=YL5NOq2N8dNWDVbc@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=Hung.Nguyen@silabs.com \
    --cc=a_villacis@palosanto.com \
    --cc=dpfrey@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=pho.tran@silabs.com \
    --cc=tung.pham@silabs.com \
    /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).