Skip to contentSkip to conversation

Linux support for SiLabs CP2102 devices

DISCUSSION Greg KH 3 participants 5 messages Nov 18, 2004 – May 18, 2005

lore
Share & tools
lore

Greg KH

author
#0 lore raw

Hi all,

I've been getting a lot of requests lately to see if Linux supports the USB to serial device from Silicon Laboratories called the CP2102 chip. It turns out that the company is claiming Linux support, yet they are only shipping a binary driver for Red Hat Linux 9.0.

In talking with the company, they insist that they will not release the source code to this module, and they claim that they are not infringing on any rights by not doing so. I claim that this is not true, as to write a usb to serial driver for Linux you have to use the drivers/usb/serial/usb-serial.h header file which is specifically licensed under the GPL v2. This file contains inline functions and structures that all usb-serial drivers need to use in order to work properly.

In short, there's no way you can write a Linux usb-serial driver, that uses the usbserial interface, without it being a derived work of other, GPL only code.

So, they are in violation, so what. Well, I can't do much about this (due to my employer's rules about suing companies). But I can do my best to spread the word that the CP2102 device is not supported on Linux, and should be avoided at all costs by anyone considering such a device in a future design. I encourage everyone else to help spread this information too.

If people are looking for a good usb to serial chip that is supported on Linux, Windows, and OS-X, there's the PL2303 device from Prolific, and the FTDI-SIO chip, and the MCT-U232 chip. All of these work very well on Linux, and are fully supported by all distros. I think they even might be cheaper than the CP2102 device too :)

Oh, and just for fun, attached to this message is the Linux driver that SiLabs is distributing, if anyone wants to poke around in it. The tarball contains 2 binary drivers, one of them a version of the usbserial.c file (which plainly is licensed under the GPL) and a mcci_usb.o binary driver. Have fun with it, but don't blame me for any badness that might happen to your box for running it, no one has any way of knowing exactly what this driver is doing.

So, in conclusion, please stay away from Silicon Laboratories devices, if you want to run Linux, as they are obviously not supporting Linux in any way.

thanks,

greg k-h

#1 lore raw
Quoted 10 lines · Greg KH

Hi all,

I've been getting a lot of requests lately to see if Linux supports the USB to serial device from Silicon Laboratories called the CP2102 chip. It turns out that the company is claiming Linux support, yet they are only shipping a binary driver for Red Hat Linux 9.0.

In talking with the company, they insist that they will not release the source code to this module, and they claim that they are not infringing on any rights by not doing so.

(... snip ...)

Quoted 6 lines

So, they are in violation, so what. Well, I can't do much about this (due to my employer's rules about suing companies). But I can do my best to spread the word that the CP2102 device is not supported on Linux, and should be avoided at all costs by anyone considering such a device in a future design. I encourage everyone else to help spread this information too.

(... snip ...)

Quoted 3 lines

So, in conclusion, please stay away from Silicon Laboratories devices, if you want to run Linux, as they are obviously not supporting Linux in any way.

If anyone has the USB Vendor/Product IDs (VID/PID) for these errant devices, a negative report (maybe including a link back to Greg's post in the Linux-USB-Devel list archives [http://
marc.theaimsgroup.com/?l=linux-usb-devel&m=110079963113076&w=2]) should be submitted to the USB 'Working Devices' list for RS-232/USB adapters at:

http://www.qbik.ch/usb/devices/showdevcat.php?id=12

(I just did a search at that location for 'CP2102' and 'Silicon' and 'SiLabs' and found no entries for any such devices. I don't see any USB VID/PID info about them or their devices in the 'usb.ids' file either.)

That might help keep future users away from the devices of a company with such a poorly-thought-out policy.

Thank you, Greg, for alerting us to this situation.

Bill Marr

author
#2 lore raw

Re: Linux support for SiLabs CP210x devices

In reply to Greg KH

Back in November of last year, I wrote about how SiLabs were distributing a binary only version of a usb-serial driver for Linux that was violating the GPL <http://thread.gmane.org/gmane.linux.kernel/256403>

Well, it looks like SiLabs and MCCI have finally released the source code to their driver, but in obfuscated form. I've attached the .zip file to this message so that everyone can see this horrible nightmare of a "driver". As per the GPL, they are still violating the license as obfuscated code releases is not allowed. And as such, they are still violating my copyright, and the copyrights of a few other kernel developers.

So, just to re-iterate, I very soundly do not recommend ever buying any devices from this company, as if this is the way they treat well established legal issues, who know what else they have done...

Oh, and if you don't want to go through the trouble of opening up the zip file, I've included inline their header file, in all of it's glory, with no changes made by me at all, below.

And yes, if you notice the 2.6 kernel does now support this device, but that is because of some people reverse engineering the device. It was by no help of the company involved (when seeing this code, those developers just laughed and said it would be more work to try to read it than to finish up the driver itself.)

thanks,

greg k-h

-------------------- actual .h file is below -------

#ifndef \
O1001101000
#define \
O1001101000 \

#define \
l1001101001 \
\
0200
#define \
l1001101010 \
\
0x00
#define \
l1001101011 \
\
0201
#define \
O1001101100 \
\
0x01
#define \
l1001101101 \
\
0x82
#define \
l1001101110 \
\
0x02
#define \
O1001101111 \
\
0x83
#define \
l1001110000 \
\
0x03
#define \
O1001110001 \
\
0xa0
#define \
O1001110010 \
\
0x20
#define \
O1001110011 \
\
0xa1
#define \
O1001110100 \
\
0x21
#define \
O1001110101 \
\
0242
#define \
O1001110110 \
\
0x22
#define \
O1001110111 \
\
0243
#define \
l1001111000 \
\
043
#define \
O1001111001 \
\
0300
#define \
O1001111010 \
\
0100
#define \
O1001111011 \
\
0xc1
#define \
l1001111100 \
\
0x41
#define \
O1001111101 \
\
0302
#define \
O1001111110 \
\
0102
#define \
l1001111111 \
\
0xc3
#define \
l1010000000 \
\
0x43
#define \
l1010000001 \
\
(7)
#define \
l1010000010 \
\
(1 << l1010000001)
#define \
O1010000011 \
\
(0 << l1010000001)
#define \
O1010000100 \
\
(1 << l1010000001)
#define \
O1010000101 \
\
(5)
#define \
O1010000110 \
\
(3 << O1010000101)
#define \
l1010000111 \
\
(0 << O1010000101)
#define \
l1010001000 \
\
(1 << O1010000101)
#define \
O1010001001 \
\
(2 << O1010000101)
#define \
l1010001010 \
\
(3 << O1010000101)
#define \
O1010001011 \
\
(0)
#define \
O1010001100 \
\
(0x1f << O1010001011)
#define \
l1010001101 \
\
(0x00 << O1010001011)
#define \
O1010001110 \
\
(0x01 << O1010001011)
#define \
l1010001111 \
\
(0x02 << O1010001011)
#define \
O1010010000 \
\
(0x03 << O1010001011)
#define \
O1010010001 \
\
0
#define \
l1010010010 \
\
1
#define \
l1010010011 \
\
3
#define \
l1010010100 \
\
5
#define \
l1010010101 \
\
6
#define \
l1010010110 \
\
7
#define \
O1010010111 \
\
8
#define \
l1010011000 \
\
011
#define \
O1010011001 \
\
0xa
#define \
O1010011010 \
\
0xb
#define \
l1010011011 \
\
0xc
#define \
l1010011100 \
\
1
#define \
O1010011101 \
\
2
#define \
l1010011110 \
\
3
#define \
l1010011111 \
\
4
#define \
l1010100000 \
\
5
#define \
l1010100001 \
\
0
#define \
l1010100010 \
\
1
#define \
O1010100011 \
\
2
#define \
l1010100100 \
\
3
#define \
O1010100101 \
\
0
#define \
l1010100110 \
\
1
#define \
O1010100111 \
\
0x80
#define \
l1010101000 \
\
0x0f
#define \
O1010101001 \
\
(1 << 0)
#define \
O1010101010 \
\
(1 << 1)
#define \
O1010101011 \
\
(1 << 0)
#endif

#3 lore raw

Re: Linux support for SiLabs CP210x devices

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Greg.

Quoted 20 lines

Back in November of last year, I wrote about how SiLabs were distributing a binary only version of a usb-serial driver for Linux that was violating the GPL <http://thread.gmane.org/gmane.linux.kernel/256403>

Well, it looks like SiLabs and MCCI have finally released the source code to their driver, but in obfuscated form. I've attached the .zip file to this message so that everyone can see this horrible nightmare of a "driver". As per the GPL, they are still violating the license as obfuscated code releases is not allowed. And as such, they are still violating my copyright, and the copyrights of a few other kernel developers.

So, just to re-iterate, I very soundly do not recommend ever buying any devices from this company, as if this is the way they treat well established legal issues, who know what else they have done...

Oh, and if you don't want to go through the trouble of opening up the zip file, I've included inline their header file, in all of it's glory, with no changes made by me at all, below.

Quoted 5 lines

And yes, if you notice the 2.6 kernel does now support this device, but that is because of some people reverse engineering the device. It was by no help of the company involved (when seeing this code, those developers just laughed and said it would be more work to try to read it than to finish up the driver itself.)

Is this for real? What exactly do they think they're trying to pull here?

I've seen borderline violations but this .. this .. this ..

If the .h file was bad, the .c's are worse.

// Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)

iD8DBQFCi4KkBrn2kJu9P78RAum2AJ9ead+TvBLTbPVW2gvfUXFlY/9cGwCfWmud Trfomjn4d+Wd1HHw/IAdlvQ=
=WWVK
-----END PGP SIGNATURE-----

author
#4 lore raw

Re: Linux support for SiLabs CP210x devices

Quoted 2 lines · Stefan Smietanowski

Is this for real? What exactly do they think they're trying to pull here?

Yes this is for real, and I have no idea what they are trying to do.

Quoted 3 lines

I've seen borderline violations but this .. this .. this ..

If the .h file was bad, the .c's are worse.

Yes it is. And because of this I know of at least one company that has switched their hardware design away from using this chip already. Hopefully everyone else will do the same (with the prolifieration of cheap, usb to serial chips, that work well with Linux, there is no reason anyone should use this device.)

thanks,

greg k-h