cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Observer
Observer
3,963 Views
Registered: ‎01-11-2016

Petalinux gpio

Hi, 

I have a problem with my PS GPIO. I've routed them throught EMIO to PMOD and I would like to use it with petalinux. 

 

In /sys/class/gpio I have: export gpiochip906 unexport. I tried to change value of one of the 906-908 gpio but nothing change on PMOD. Also when I cat ./gpio908/value I always have 0.

 

Here is my dts struct:

&gpio0{
    emio-gpio-width = <3>;
    gpio-mask-high = <0x0>;
    gpio-mask-low = <0x5600>;
};

Where can be a reason of this problem

Tags (3)
0 Kudos
4 Replies
Highlighted
Explorer
Explorer
3,927 Views
Registered: ‎11-09-2015

hi @kmbm,

   what version petalinux are you use?

   take a look at http://www.wiki.xilinx.com/Linux+GPIO+Driver

   have you export the gpio’s direction?

 

0 Kudos
Highlighted
Observer
Observer
3,921 Views
Registered: ‎01-11-2016

I use petalinux 2016.2.

Yes I set direction. Here Is what i did

 

export 906 > export
cd gpio906
echo out > direction
echo 1 > value

The link which you included  doesn't help

0 Kudos
Highlighted
Explorer
Explorer
3,898 Views
Registered: ‎11-09-2015

try delete the dts you added.

&gpio0{
    emio-gpio-width = <3>;
    gpio-mask-high = <0x0>;
    gpio-mask-low = <0x5600>;
};

 

0 Kudos
Highlighted
Explorer
Explorer
3,896 Views
Registered: ‎11-09-2015

have you set emio‘s  constraint? just like this:

set_property PACKAGE_PIN W15 [get_ports {gpio_0_tri_io[0]}]
set_property PACKAGE_PIN W16 [get_ports {gpio_0_tri_io[1]}]

0 Kudos