How to use unrecognized COM port card?

John Baldwin jhb at freebsd.org
Tue Aug 16 15:57:22 UTC 2011


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 at 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


More information about the freebsd-stable mailing list