UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
1,248 Views
Registered: ‎02-08-2017

Methods to build GPIO driver in Zynq

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).

 

By referring to Linux documentation here, they mentioned that sysfs is deprecated. Instead, they recommend to use gpiolib for dealing with GPIO interfaces.

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,

Tags (1)
0 Kudos
3 Replies
Highlighted
Visitor xlx
Visitor
1,233 Views
Registered: ‎03-01-2013

Re: Methods to build GPIO driver in Zynq

GPIO Linux Driver for Zynq and Zynq Ultrascale+ MPSoC

 

http://www.wiki.xilinx.com/Linux+GPIO+Driver

 

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).

0 Kudos
Explorer
Explorer
1,218 Views
Registered: ‎02-08-2017

Re: Methods to build GPIO driver in Zynq

@xlxHave you read my questions !!!

0 Kudos
Visitor xlx
Visitor
1,205 Views
Registered: ‎03-01-2013

Re: Methods to build GPIO driver in Zynq

here:   PetaLinux 2014.4 Linux Image with Custom IP UIO Driver

 

http://www.syfer.com.au/assets/s502-00003-a.pdf

 

 

0 Kudos