Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.
This commit is contained in:
skrll 2005-07-30 06:14:49 +00:00
parent 7dab65d668
commit acd7c4c5ca
9 changed files with 1185 additions and 10 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh -
# $NetBSD: MAKEDEV.tmpl,v 1.46 2005/07/11 15:37:03 kiyohara Exp $
# $NetBSD: MAKEDEV.tmpl,v 1.47 2005/07/30 06:14:49 skrll Exp $
#
# Copyright (c) 2003 The NetBSD Foundation, Inc.
# All rights reserved.
@ -186,6 +186,7 @@
# urio* USB Diamond Rio 500 devices
# uscanner* USB scanners
# ttyU* USB modems
# ttyY* USB serial adapters
#
# ISDN devices:
# isdn communication between userland isdnd and kernel
@ -495,6 +496,7 @@ usbs)
makedev uhid0 uhid1 uhid2 uhid3
makedev ulpt0 ulpt1
makedev ttyU0 ttyU1
makedev ttyY0 ttyY1
makedev urio0
makedev uscanner0 uscanner1
makedev ugen0
@ -553,6 +555,13 @@ uscanner*)
mkdev uscanner$unit c %uscanner_chr% $unit
;;
ttyY*)
unit=${i#ttyY}
mkdev ttyY$unit c %ucycom_chr% $(($unit + $dialin )) "" "" $u_uucp
mkdev dtyY$unit c %ucycom_chr% $(($unit + $dialout )) "" "" $u_uucp
mkdev ctyY$unit c %ucycom_chr% $(($unit + $callunit)) "" "" $u_uucp
;;
ttyU*)
unit=${i#ttyU}
mkdev ttyU$unit c %ucom_chr% $(($unit + $dialin )) "" "" $u_uucp

80
share/man/man4/ucycom.4 Normal file
View File

@ -0,0 +1,80 @@
.\" $NetBSD: ucycom.4,v 1.1 2005/07/30 06:14:49 skrll Exp $
.\"
.\" Copyright (c) 2005 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Nick Hudson
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 16, 2005
.Dt UCYCOM 4
.Os
.Sh NAME
.Nm ucycom
.Nd USB support for Cypress microcontroller based serial adapters
.Sh SYNOPSIS
.Cd "ucycom at uhidev? reportid ?"
.Sh HARDWARE
The
.Nm
driver supports the following adapters:
.Pp
.Bl -tag -width Dv -offset indent -compact
.It Various low-cost USB-RS232 adapters
.It Delmore Earthmate GPS receiver
.El
.Sh DESCRIPTION
The
.Nm
driver provides support for Cypress microcontroller based USB-to-RS-232
adapter.
The
.Nm
driver shows a behaviour like a
.Xr tty 4 .
This means that normal programs such as
.Xr tip 1
or
.Xr pppd 8
can be used to access the device.
.Sh FILES
.Bl -tag -width Pa
.It Pa /dev/ttyY?
.El
.Sh SEE ALSO
.Xr uhidev 4 ,
.Xr usb 4
.Sh HISTORY
The
.Nm
driver
appeared in
.Nx 4.0 .

View File

@ -1,4 +1,4 @@
.\" $NetBSD: uhidev.4,v 1.2 2001/12/29 03:06:41 augustss Exp $
.\" $NetBSD: uhidev.4,v 1.3 2005/07/30 06:14:49 skrll Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 27, 2001
.Dd July 30, 2005
.Dt UHIDEV 4
.Os
.Sh NAME
@ -42,6 +42,7 @@
.Nd USB Human Interface Device support
.Sh SYNOPSIS
.Cd "uhidev* at uhub?"
.Cd "ucycom* at uhidev? reportid ?"
.Cd "uhid* at uhidev? reportid ?"
.Cd "ukbd* at uhidev? reportid ?"
.Cd "ums* at uhidev? reportid ?"
@ -58,10 +59,11 @@ kinds of devices and
.Nm
only dispatches data to them based on the report id.
.Sh SEE ALSO
.Xr ucycom 4 ,
.Xr uhid 4 ,
.Xr ukbd 4 ,
.Xr ums 4 ,
.Xr usb 4
.Xr usb 4
.Sh HISTORY
The
.Nm

View File

@ -1,4 +1,4 @@
.\" $NetBSD: usb.4,v 1.75 2005/07/24 08:44:59 augustss Exp $
.\" $NetBSD: usb.4,v 1.76 2005/07/30 06:14:49 skrll Exp $
.\"
.\" Copyright (c) 1999-2005 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 24, 2005
.Dd July 30, 2005
.Dt USB 4
.Os
.Sh NAME
@ -135,6 +135,8 @@ driver for Kawasaki LSI KL5KUSB101B USB Ethernet.
driver for audio devices.
.It ubsa
driver for Belkin serial adapters.
.It ucycom
driver for Cypress microcontroller serial adapters.
.It udsbr
driver for D-Link DSB-R100 USB radio.
.It uftdi
@ -518,6 +520,7 @@ specifications can be found at:
.Xr uaudio 4 ,
.Xr ubsa 4 ,
.Xr ucom 4 ,
.Xr ucycom 4 ,
.Xr udsbr 4 ,
.Xr uep 4 ,
.Xr ugen 4 ,

View File

@ -1,4 +1,4 @@
# $NetBSD: majors,v 1.15 2005/07/11 15:37:04 kiyohara Exp $
# $NetBSD: majors,v 1.16 2005/07/30 06:14:50 skrll Exp $
#
# Device majors for Machine-Independent drivers.
#
@ -21,3 +21,4 @@ device-major dk char 168 block 168
device-major tap char 169 tap
device-major veriexec char 170 veriexec
device-major fw char 171 ieee1394if
device-major ucycom char 172 ucycom

View File

@ -1,4 +1,4 @@
# $NetBSD: DEVNAMES,v 1.185 2005/07/18 11:42:28 augustss Exp $
# $NetBSD: DEVNAMES,v 1.186 2005/07/30 06:14:50 skrll Exp $
#
# This file contains all used device names and defined attributes in
# alphabetical order. New devices added to the system somewhere should first
@ -1262,6 +1262,7 @@ ucbsnd hpcmips
ucbtp hpcmips
ucom MI
ucombus MI Attribute
ucycom MI
uda MI
udav MI
udsbr MI

View File

@ -1,4 +1,4 @@
# $NetBSD: files.usb,v 1.63 2005/07/18 11:42:28 augustss Exp $
# $NetBSD: files.usb,v 1.64 2005/07/30 06:14:50 skrll Exp $
#
# Config file and device description for machine-independent USB code.
# Included by ports that need it. Ports that use it must provide
@ -88,6 +88,11 @@ device uep: wsmousedev, tpcalib
attach uep at uhub
file dev/usb/uep.c uep needs-flag
# Cypress microcontroller based serial adpaters
device ucycom: hid
attach ucycom at uhidbus
file dev/usb/ucycom.c ucycom needs-flag
# Printers
device ulpt
attach ulpt at uhub

1073
sys/dev/usb/ucycom.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/* $OpenBSD: usb_port.h,v 1.18 2000/09/06 22:42:10 rahnds Exp $ */
/* $NetBSD: usb_port.h,v 1.67 2005/07/18 11:42:28 augustss Exp $ */
/* $NetBSD: usb_port.h,v 1.68 2005/07/30 06:14:50 skrll Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@ -98,6 +98,7 @@ MALLOC_DECLARE(M_USBHC);
#define UBT_DEBUG 1
#define AXE_DEBUG 1
#define UIPAQ_DEBUG 1
#define UCYCOM_DEBUG 1
#define Static
#else
#define Static static