cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
--alex
Visitor
Visitor
135 Views
Registered: ‎10-03-2018

'No such device' error for gpio interrupt (petalinux userspace)

Hello,

I am trying to use a GPIO IP Block from a Linux user space application (on a zynq ultrascale+). Reading pin states works, but when I try to use Interrupts I get a 'No such device' error.

 

 

root@PetaLinux:~# gpioget 0 0
1
root@PetaLinux:~# gpiomon 0 0
gpiomon: error configuring GPIO line events: No such device

 

 

The same problem occurs when using gpiod from a C application.

I verified, that interrupts reach the PS, using the device file and uio. So this is not a Hardware/FPGA issure.

I suspect, that there is some problem with the driver or the devicetree, but I don't see any obvious difference between the autogenerated device tree entry below and this dokumentation.

Device Tree Entry extracted using fdt from U-boot

 

 

gpio@81601000 {
        #gpio-cells = <0x00000003>;
        #interrupt-cells = <0x00000002>;
        clock-names = "s_axi_aclk";
        clocks = <0x00000003 0x00000048>;
        compatible = "xlnx,xps-gpio-1.00.a";
        gpio-controller;
        interrupt-controller;
        interrupt-names = "ip2intc_irpt";
        interrupt-parent = <0x00000004>;
        interrupts = <0x00000000 0x0000005d 0x00000004>;
        reg = <0x00000000 0x81601000 0x00000000 0x00001000>;
        xlnx,all-inputs = <0x00000001>;
        xlnx,all-inputs-2 = <0x00000000>;
        xlnx,all-outputs = <0x00000000>;
        xlnx,all-outputs-2 = <0x00000001>;
        xlnx,dout-default = <0x00000000>;
        xlnx,dout-default-2 = <0x00000000>;
        xlnx,gpio-width = <0x00000001>;
        xlnx,gpio2-width = <0x00000002>;
        xlnx,interrupt-present = <0x00000001>;
        xlnx,is-dual = <0x00000000>;
        xlnx,tri-default = <0xffffffff>;
        xlnx,tri-default-2 = <0xffffffff>;
};

 

 

Thanks in advance

Alex

 

Tags (3)
0 Kudos
0 Replies