02-28-2018 12:18 AM
I am walking steps by step in learning how to build drivers for my hardware. Starting by GPIO in Zynq UltraScale+ (ZCU102 board), I found in this XilinxWiki that we can use sysfs to control the driver through the kernel. At the end of the same wiki page they provided alternative to sysfs by using ready drivers (gpio-keys, gpio-keys-polled and leds-gpio).
Also I came accross Zynq gpio driver that seems to be based on that gpiolib.
Also I found something called UIO driver that should be enabled in Petalinux.
Now I am getting confused because all of these methods for building a hardware driver and my questions can be as follows:
- It seems to me that sysfs method is the easiest way for controlling the dirver, but it as mentioned before it is going to be deprecated, So is it recommended to keep using it?
- Is there any design example for using Zynq gpio library as it is complex or unclear for me please.
- Is there any guide/documentation about UIO in Petalinux please and how to use it.
- Is there any documentation (UserGuide, ApplicationNote, etc) about GPIO in ZynqMP and which hardware should be instantiated in vivado to control the GPIO.
Thanks in Advance,
02-28-2018 12:59 AM
GPIO Linux Driver for Zynq and Zynq Ultrascale+ MPSoC
The purpose of this page is to introduce two methods for interacting with GPIO from user space: the SysFs interface and the Linux kernel drivers (gpio-keys, leds-gpio).