Introduction:
================

The cifX/M.2 card is a netX90 based multi function PCIe device.
It provides a SPI interface for accessing the netX90 as well as multiple GPIOs.
GPIO offset 7 can optionally be used as IRQ for the cifX driver.


Build driver modules:
=====================

# make

This results in the following linux drivers modules ...

- ax99100-pci-spi.ko
- ax99100-pci-gpio.ko


Install driver modules:
=======================

# sudo make modules_install

This will copy the driver modules into the desired kernel library folder which are compiled for.

# sudo depmod

Update the module dependencies in the modules.dep file.


Module parameter:
=================

It is possible to register up to 3 SPI slave devices while loading the driver using module parameters.
This enables you to add a spidev device which is required by the cifX driver for accessing the netX90 based cifX/M.2 card.

Module parameters are:

- modalias[0..2]=<device>
- mode[0..2]=[0..3]
- max_speed_hz[0..2]=<freq>

Example: Add a spidev at chip-select 0 for accessing the netX90 based cifX/M.2 card

# modprobe ax99100-pci-spi modalias0=spidev mode0=3 max_speed_hz0=25000000

or

# modprobe ax99100-pci-spi modalias0=spidev

Note: Speed and mode can be configured by user space application!


To enable the auto creation of spidev device at boot time, a configuration file must be created as follow.

# echo "options ax99100-pci-spi modalias0=spidev" > /etc/modprobe.d/cifx-m2.conf
