Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jan 2008 16:13:41 -0700
From:      "Steve Franks" <stevefranks@ieee.org>
To:        "User Questions" <freebsd-questions@freebsd.org>
Subject:   Re: how to compile and install a new driver [for CP2101]
Message-ID:  <539c60b90801081513t58df0ab3vceab838848a6849f@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I thought a number of people would be interested in my experience with
the CP2101 driver on FreeBSD, so here it is:

---------- Forwarded message ----------
From: Steve Franks <stevefranks@ieee.org>
Date: Dec 25, 2007 4:41 PM
Subject: Re: usb/119002: add "ucp" driver support
To: bug-followup@freebsd.org, stevefranks@ieee.org


Sucess!  I have built and proven that the ucp.ko driver works with all
my various work and hobby projects using the Silicon Laboratories
CP2101, CP2102, and CP2103 devices.  There are alot of other
off-the-shelf OEM devices using this chipset, which allow for
different VID's & PID's (see the patch file) - I was obviously unable
to test them as I only have the manufacturer's reference design style
hardware, but there is no way to modify the operation of the chipset
except for the VID & PID, so I assume they will work fine if FreeBSD
recognizes the VID & PID - not a usb expert.  Test was performed with
Minicom talking to /dev/cuaU0; after kldload ucp, plugging in a CP210x
yields "ucom0" in dmesg, and cuaU0 in /dev.

I think my earlier problem was due to the patch mucking the system -
if run from /usr/src/sys, it doesn't create the modules/ucp folder
like it should, don't know why.  Here's what I did that worked:

1. /usr/src/sys/dev/usb# patch < ~/ucp-0.01.diff
2. /usr/src/sys/dev/usb# mkdir /usr/src/sys/modules/ucp
3. /usr/src/sys/dev/usb# mv Makefile /usr/src/sys/modules/ucp
3a. Once you have proven it works, you might want to remove the -DEBUG
line from this makefile (I did up front, never tested with debug
symbols/code on my system)
4. manually edit /usr/src/sys/dev/usb/usbdevs to fix the patch
collision and add all the new lines (specifically vendor SILABS 0x10c4
Silicon labs)
5. manually edit /usr/src/sys/modules/Makefile to add the line:
            ucp \
    after the line
            ucom \
6. build & install kernel

Incidentally, since I cvsup'd to clean up my previous mess, I am now
on 6.3-xxx, but I don't think that was a factor in making it work.

Also, note that step 5 is not in the diff file at all for some reason,
as opposed to step 4 which simply didn't patch in automatically.

Best,

Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?539c60b90801081513t58df0ab3vceab838848a6849f>