This patch adds support for the Advantech PCIE-1612B multi-port serial device
to puc(4). The device has an Exar XR17V354 UART and the changes use the
existing code that supports XR17V35x devices.

This patch was minimally tested. All four ports were tested with several
different serial devices. I only tested RS-232 and do not have the ability
to test RS-422 or RS-485.

dmesg snippet:
...
puc0 at pci4 dev 0 function 0 "Advantech PCIE-1612B-AE 4-port RS232/422/485" 
rev 0x03: ports: 16 com
com4 at puc0 port 0 apic 2 int 17: xr17v35x, 256 byte fifo
com5 at puc0 port 1 apic 2 int 17: xr17v35x, 256 byte fifo
com6 at puc0 port 2 apic 2 int 17: xr17v35x, 256 byte fifo
com7 at puc0 port 3 apic 2 int 17: xr17v35x, 256 byte fifo
...


Index: pcidevs
===================================================================
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1988
diff -u -p -u -p -r1.1988 pcidevs
--- pcidevs     11 Mar 2022 08:28:40 -0000      1.1988
+++ pcidevs     10 May 2022 15:38:10 -0000
@@ -244,6 +244,7 @@ vendor      TECHSAN         0x13d0  Techsan Electroni
 vendor ABOCOM          0x13d1  Abocom
 vendor SUNDANCE        0x13f0  Sundance
 vendor CMI             0x13f6  C-Media Electronics
+vendor ADVANTECH       0x13fe  Advantech
 vendor LAVA            0x1407  Lava
 vendor SUNIX           0x1409  Sunix
 vendor ICENSEMBLE      0x1412  IC Ensemble
@@ -512,6 +513,9 @@ product ACCTON EN1217               0x1217  EN1217
 
 /* Acer products */
 product ACER M1435             0x1435  M1435 VL-PCI
+
+/* Advantech products */
+product ADVANTECH 1612B                0x000b  PCIE-1612B-AE 4-port 
RS232/422/485
 
 /* Analog Devices */
 product AD SP21535             0x1535  ADSP 21535 DSP
Index: pucdata.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/pucdata.c,v
retrieving revision 1.116
diff -u -p -u -p -r1.116 pucdata.c
--- pucdata.c   9 Jan 2022 05:42:58 -0000       1.116
+++ pucdata.c   10 May 2022 15:38:10 -0000
@@ -2139,6 +2139,20 @@ const struct puc_device_description puc_
            },
        },
 
+       {   /*
+            * Advantech PCIE-1612B-AE 4-port RS232/422/485
+            * Has a 4-channel Exar XR17V354 UART
+            */
+           {   PCI_VENDOR_ADVANTECH, PCI_PRODUCT_ADVANTECH_1612B,      0, 0 },
+           {   0xffff, 0xffff,                                         0, 0 },
+           {
+               { PUC_PORT_COM_XR17V35X, 0x10, 0x0000 },
+               { PUC_PORT_COM_XR17V35X, 0x10, 0x0400 },
+               { PUC_PORT_COM_XR17V35X, 0x10, 0x0800 },
+               { PUC_PORT_COM_XR17V35X, 0x10, 0x0C00 },
+           },
+       },
+
        {   /* Dell DRAC 3 Virtual UART */
            {   PCI_VENDOR_DELL, PCI_PRODUCT_DELL_DRAC_3_VUART, 0, 0 },
            {   0xffff, 0xffff,                                 0, 0 },

Reply via email to