Hi,
Our hardware design will need SPI driver connect AD7398 DAC, which is not supported by the kernel. Anyone knows how to add the driver to petalinux, and code example available?
I'm using Petalinux 2014.4.
Thanks
Hi,
Our hardware design will need SPI driver connect AD7398 DAC, which is not supported by the kernel. Anyone knows how to add the driver to petalinux, and code example available?
I'm using Petalinux 2014.4.
Thanks
Hi Lynn,
Nice timing, as I'm working on a reference design for this right now. I haven't got it solved yet, but I can point you to some information that may be of assistance to move you forward. Here is a post you may find useful for your DAC:
http://forum.trenz-electronic.de/index.php?topic=382.0
You don't mention if this is a Zynq or MicroBlaze design, or which board you are targeting.
Essentially, what you need to do is:
1. Ensure the hardware design has the necessary connections for OS support. You should test the hardware as well as you can using standalone code, and you will need to add a Shared Peripheral Interrupt (IRQ_F2P) that is required by the Linux driver. You can find some good information on that here:
http://www.xilinx.com/support/answers/58942.html
2. You can use the SPI hardware in the PS or in the PL. There have been enough reports of issues with PS SPI controllers in Zynq that I decided to go with the PL hardware. I'm not saying PS won't work, but it seemed like PL may be an easier path.
3. The kernel must be configured to include the SPI drivers. If you are using PL IP, this will happen automatically in the default PetaLinux configuration, when you create a project based off the HDF file exported from Vivado. I'm not sure if the same is true for PS SPI or not - you may have to manually add it, but worth verifying. Use menuconfig to search (/) for SPI and you will find the settings under Device Drivers.
4. You must manually modify the device tree to include your SPI endpoint peripheral(s) and cause Linux to load the drivers at boot time. This is a tricky part that I haven't gotten to work yet. Although PetaLinux will generate the SPI bus entry, you must manually add the entries for the devices you are using. There is some old but still useful information here that will give you some insight into the device tree parameters, and how they match up with the device driver entries as well:
http://www.xilinx.com/support/answers/58942.html
Let me know if you are successful.
Ron
Thank you! Will let you know