From owner-freebsd-usb@FreeBSD.ORG Sat Feb 5 22:13:29 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE3D71065673 for ; Sat, 5 Feb 2011 22:13:29 +0000 (UTC) (envelope-from benwy@clear.net.nz) Received: from smtp3.clear.net.nz (smtp3.clear.net.nz [203.97.33.64]) by mx1.freebsd.org (Postfix) with ESMTP id B85838FC1C for ; Sat, 5 Feb 2011 22:13:29 +0000 (UTC) Received: from blackbox.simla (121-73-118-140.cable.telstraclear.net [121.73.118.140]) by smtp3.clear.net.nz (CLEAR Net Mail) with ESMTPA id <0LG500MPVY7FPW10@smtp3.clear.net.nz> for freebsd-usb@freebsd.org; Sun, 06 Feb 2011 10:26:04 +1300 (NZDT) Date: Sun, 06 Feb 2011 10:26:03 +1300 From: Benjamin To: freebsd-usb@freebsd.org Message-id: <4D4DC06B.3070708@clear.net.nz> MIME-version: 1.0 Content-type: multipart/mixed; boundary=------------030105050503060304020501 User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.16) Gecko/20101223 Thunderbird/3.0.11 Subject: FTDI device "Olimex AVRISP-500" does not show up under FreeBSD. Linux driver source code available, translating this to changes in FreeBSD uftdi kern module? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2011 22:13:30 -0000 This is a multi-part message in MIME format. --------------030105050503060304020501 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The Olimex is a programmer for AVR microcontrollers. It is apparently an FTDI device and works under Linux. The product page at http://www.olimex.com/dev/avr-isp500.html provides source code for a Linux FTDI kernel module. I have the looked through the Linux FTDI driver source code and have even been given a patch by a helpful member at the FreeBSD forums (wblock) but so far no luck. Here is what it is identified as when plugged in to USB: Feb 5 13:30:07 blackbox kernel: ugen1.2: at usbus1 It should ideally show up as cuaU0 or ttyUSB0 as far as I understand. A quick search through the Linux driver source code to find all instances of OLIMEX: > grep OLIMEX ftdi_*.[c,h] ftdi_sio.c: { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID), ftdi_sio.c: { USB_DEVICE(OLIMEX_VID, OLIMEX_AVR_ISP500_ISO_PID) }, ftdi_sio_ids.h:#define OLIMEX_VID 0x15BA ftdi_sio_ids.h:#define OLIMEX_ARM_USB_OCD_PID 0x0003 ftdi_sio_ids.h:#define OLIMEX_AVR_ISP500_ISO_PID 0x000B Note that the above is Linux kernel module source. Myself and wblock have tried to hack the FreeBSD uftdi kernel module to no avail. He offered the attached patch which did not seem to work. The Linux driver source is available here: http://www.olimex.com/dev/soft/avr/AVR-ISP500/AVR-ISP500_linux_driver.zip Does this look like something that could easily be changed in the FreeBSD uftdi kern module? Cheers, Benjamin --------------030105050503060304020501 Content-Type: text/plain; name="patch-uftdi.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-uftdi.txt" --- sys/dev/usb/usbdevs.orig 2011-02-04 20:30:33.000000000 -0700 +++ sys/dev/usb/usbdevs 2011-02-04 20:34:20.000000000 -0700 @@ -633,6 +633,7 @@ vendor UMEDIA 0x157e U-MEDIA Communications vendor FIBERLINE 0x1582 Fiberline vendor SPARKLAN 0x15a9 SparkLAN +vendor OLIMEX 0x15ba Olimex vendor AMIT2 0x15c5 AMIT vendor SOHOWARE 0x15e8 SOHOware vendor UMAX 0x1606 UMAX Data Systems @@ -2724,6 +2725,9 @@ /* Quickshot products */ product QUICKSHOT STRIKEPAD 0x6238 USB StrikePad +/* Olimex products */ +product OLIMEX AVR_ISP500 0x0105 AVR-ISP500 + /* Radio Shack */ product RADIOSHACK USBCABLE 0x4026 USB to Serial Cable --- sys/dev/usb/serial/uftdi.c.orig 2011-02-04 20:35:15.000000000 -0700 +++ sys/dev/usb/serial/uftdi.c 2011-02-04 20:41:56.000000000 -0700 @@ -259,6 +259,7 @@ UFTDI_DEV(MATRIXORBITAL, MOUA, 8U232AM), UFTDI_DEV(MARVELL, SHEEVAPLUG, 8U232AM), UFTDI_DEV(MELCO, PCOPRS1, 8U232AM), + UFTDI_DEV(OLIMEX, AVR_ISP500, 8U232AM), UFTDI_DEV(RATOC, REXUSB60F, 8U232AM), #undef UFTDI_DEV }; --------------030105050503060304020501--