Driver Installation/Configuration for M.2 Exar Corp. XR17V3521 Dual PCIe UART on Zymbit Secure Edge Node.
This page outlines the steps required to get PCIe DB9 serial ports up and running on the Zymbit Secure Edge Node (SEN). This device uses Max Linear’s (formerly Exar Corp.) xr17v35x family of chipsets. The process has been tested and validated for the 6.6.31 Raspberry Pi kernel that ships with Debian Bookworm paired with an IOCrest SI-ADA15069 M.2 adapter card.
Building.
The IOCrest unit ships with a CD containing working driver code for pre-6.x kernels, located in the EXAR
directory on the disc. For convenience, a link to the driver package is also provided here. For kernel 6.0 and later, a patch file is provided below.
- Install the required build tools. On Debian-based systems:
sudo apt install build-essential linux-headers patch
Obtain and extract
xr17_linux_driver_v2.6.zip
.Edit the
Makefile
and changeSUBDIRS
toM
in line 13.
- If installing on a 6.0 or newer kernel, apply this patch to
xr17v35x.c
.
Follow the steps in the driver package’s
readme
section 3.2A to unbind the serial ports from the generic driver.Build the module by running
make
.Load the driver into the kernel:
insmod ./xr17v35x.ko
The serial ports should now be listed as /dev/ttyXR*
.
Installation.
You may wish to install the driver module so that it is automatically loaded on boot. This section outlines the process required to do so.
- Install
xr17v35x.ko
into/lib/modules
:
- OPTIONAL: to compress the
xr17v35x.ko
module, runsudo <compression-program> /lib/modules/$(uname -r)/kernel/drivers/char/xr17v35x.ko
aftermake install
and before runningdepmod
, where<compression-program>
isxz
,gzip
, etc.
cd <path-to-xr17-lnx2.6.32-and-newer-pak_ver2.6>
sudo make install
sudo depmod -a
- Create a file with the following contents called
00-xrserial.rules
in/etc/udev/rules.d
to ensure device the works across reboots. This will unbind the PCIe device from linux’s generic PCI serial driver and then reload the vendor-specific driver module.
- If more than one PCIe serial device is present and the below rule doesn’t work, try adding
KERNEL==<path>,
to the beginning of the line below, where<path>
is the PCI bus path value used in step 3.2.A of the driver package’sreadme
.
# MaxLinear PCIe dual DB-9 serial port
ACTION=="add", SUBSYSTEM=="pci", ATTR{class}=="0x070002", ATTR{vendor}=="0x13a8", ATTR{device}=="0x0352", ATTR{revision}=="0x03", \
ATTR{driver_override}="xrserial", \
RUN+="/bin/sh -c 'echo $kernel > /sys/$devpath/driver/unbind'", \
RUN+="/sbin/modprobe -r xr17v35x", \
RUN+="/sbin/modprobe xr17v35x"