SPI Linux Kernel Device Drivers

Currently I have a program that sends/receives data over the ethernet/wlan etc. network interface on the PocketBeagle. What I’m trying to achieve is simply have the SPI port configured as a Linux network interface to send/receive data to a Qualcomm QCA7000 chip (serial-to-powerline bridge chip).

Qualcomm provides the following drivers and only the following drivers to access their QCA7000 chip over SPI (qca-spi). How does one actually use these SPI drivers on the PocketBeagle (running Debian Stretch IoT)? Are the drivers necessary and will they even work at all, or will I need to make use of Linux kernel spidev device driver? Not sure if the device tree needs to be considered here too, I am very overwhelmed by this concept.

The driver appears to be 8 yrs old, this puts it in kernel version 3.x or possibly 2.x, a lot of kernel api calls have changed since then. A starting point would be to get the kernel source that your using in the Stretch release, add the driver (if it is not already there) and see if you can build it. However you will most likely need to make driver changes to get it to build. (IMO).

Freescale (NXP) maintained there own kernel for LTIB/MX28. So IMO, you will have some work to do.

Good luck.

I did give it a go and try to compile on my BeagleBone Black running
5.5.9 kernel.

Here are the results:

qca-spi/qca_spi.c:828:5: error: ‘struct net_device’ has no member
named ‘trans_start’; did you mean ‘mem_start’?

qca-spi/qca_spi.c:1079:80: error: macro "alloc_netdev" requires 4
arguments, but only 3 given


Hi Drew,
If you find the .h file that contains the definition of ‘struct net_device’ you will see that ‘trans_start’ is no longer part of it, maybe just a name change (if your lucky).
As for ‘alloc_netdev’ the api has changed. Try to find another driver that calls ‘alloc_netdev’, this will give you an idea of what the parameters are and how they are used.
If your serious about debugging this driver, for every error your seeing, find another driver that calls the api that have different parameters and see if you can figure out how to work the changes. As for 'struct’s that have changed, find another driver that uses this same structure and see if you can make heads or tails of what has changed.

Just a quick google, here are some links that may help.


This one looks like there is some support in linux 4.12,

(found in Linux kernels: 3.18–3.19, 4.0–4.12)

This link implies there is 5.6.3 support


You may want to do some more searching on this driver.