Date: Tue, 16 Aug 2011 11:57:20 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-stable@freebsd.org Cc: Yuri <yuri@rawbw.com>, d@delphij.net, Xin LI <delphij@delphij.net> Subject: Re: How to use unrecognized COM port card? Message-ID: <201108161157.20890.jhb@freebsd.org> In-Reply-To: <4E4A3788.3030605@rawbw.com> References: <4E4A0C81.7020501@rawbw.com> <4E4A20BE.3060603@delphij.net> <4E4A3788.3030605@rawbw.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, August 16, 2011 5:25:28 am Yuri wrote: > On 08/16/2011 00:48, Xin LI wrote: > > A wild guess... (You gotta to provide more details rather than just PCI > > IDs). > > > > My guess is that it's using these chips: > > > > http://www.winchiphead.com/product/ch365detail.htm > > http://www.winchiphead.com/product/ch353detail.htm > > > > It didn't talked about possible cards' configuration so I used BAR0, > > which could be 0x14, 0x18, etc. > > Actually, the main chip there is CH352L. Plus there are two more chips > ST75185C, one per COM port. > > Your patch made this pci device to connect to uart driver: uart2@pci0:8:1:0. > > uart2: <16550 or compatible> port 0xe880-0xe887,0xe800-0xe807 irq 17 at > device 1.0 on pci8 > uart2: [FILTER] > > Also new devices showed up: > /dev/cuau2 > /dev/cuau2.init > /dev/cuau2.lock > /dev/ttyu2 > /dev/ttyu2.init > /dev/ttyu2.lock > > cuau2 is probably the same as COM port. I don't have an easy way to > check now. > I believe adding another entry with 0x14 would add the second COM port. For multiport devices you will want to add an entry to sys/dev/puc/pucdata.c and use the puc driver instead of patching uart directly. Perhaps this: Index: pucdata.c =================================================================== --- pucdata.c (revision 224898) +++ pucdata.c (working copy) @@ -862,6 +862,13 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_syba }, + { + 0x4348, 0x3253, 0xffff, 0, + "WinChipHead Dual Port RS-232", + DEFAULT_RCLK, + PUC_PORT_2S, 0x10, 4, 0, + }, + { 0x6666, 0x0001, 0xffff, 0, "Decision Computer Inc, PCCOM 4-port serial", DEFAULT_RCLK, -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108161157.20890.jhb>