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: 
Highlighted
Visitor deryai
Visitor
2,332 Views
Registered: ‎05-09-2017

AXI GPIO INTERRUPT LINUX

Hi everyone,

 

We are trying to add Max14830 driver to our custom board designed with xc7z045. We connect interrupt pin of MAX14830 to PL side EMIO(axi gpio pin 1), NOT the signal- bacause MAX14830 IRQ is working edge falling but linux kernel is allowed only edge rising- , then connect this to a PL-PS interrupt.  device tree files are below:

pcw.dtsi

&spi0 {
     is-decoded-cs = <0>;
      num-cs = <3>;
     status = "okay";
     max14830@0{
             clock-names = "xtal";
              clocks = <&osc 0>;
              compatible="maxim,max14830";
               reg =<0>; //chipselect 0
               spi-max-frequency= <1048576>;
               interrupt-parent = <&axi_gpio_0>;
                interrupts = <0 1 0x4>;
               gpio-controller;
               #gpio-cells = <2>;
             };
};

pl.dtsi

amba_pl: amba_pl {
        #address-cells = <1>;
          #size-cells = <1>;
         compatible = "simple-bus";
         ranges ;
        axi_gpio_0: gpio@41200000 {
              #gpio-cells = <2>;
              compatible = "xlnx,xps-gpio-1.00.a";
               gpio-controller ;
               interrupt-parent = <&intc>;
               interrupts = <0 29 4>;
              reg = <0x41200000 0x10000>;
              xlnx,all-inputs = <0x0>;
              xlnx,all-inputs-2 = <0x0>;
              xlnx,all-outputs = <0x0>;
              xlnx,all-outputs-2 = <0x0>;
              xlnx,dout-default = <0x00000001>;
              xlnx,dout-default-2 = <0x00000000>;
              xlnx,gpio-width = <0x2>;
              xlnx,gpio2-width = <0x20>;
              xlnx,interrupt-present = <0x1>;
              xlnx,is-dual = <0x0>;
              xlnx,tri-default = <0xFFFFFFFF>;
              xlnx,tri-default-2 = <0xFFFFFFFF>;
        };
};

 

It seems successful load of driver and request irq.The interrupt number as 168 can be seen on below:

 

root@petalinux_out:~# cat /proc/interrupts
CPU0 CPU1
16: 0 0 GIC 27 gt
17: 0 0 GIC 43 ttc_clockevent
18: 322 297 GIC 29 twd
21: 43 0 GIC 39 f8007100.adc
141: 0 0 GIC 35 f800c000.ocmc
142: 118 0 GIC 82 xuartps
143: 143 0 GIC 58 e0006000.spi
144: 0 0 GIC 81 e0007000.spi
145: 0 0 GIC 51 e000d000.spi
146: 0 0 GIC 77 eth0
147: 0 0 GIC 45 f8003000.dmac
148: 0 0 GIC 46 f8003000.dmac
149: 0 0 GIC 47 f8003000.dmac
150: 0 0 GIC 48 f8003000.dmac
151: 0 0 GIC 49 f8003000.dmac
152: 0 0 GIC 72 f8003000.dmac
153: 0 0 GIC 73 f8003000.dmac
154: 0 0 GIC 74 f8003000.dmac
155: 0 0 GIC 75 f8003000.dmac
156: 0 0 GIC 40 f8007000.devcfg
164: 0 0 GIC 41 f8005000.watchdog
168: 0 0 GIC 33 spi32766.0
IPI1: 0 0 Timer broadcast interrupts
IPI2: 802 842 Rescheduling interrupts
IPI3: 0 0 Function call interrupts
IPI4: 31 21 Single function call interrupts
IPI5: 0 0 CPU stop interrupts
IPI6: 0 0 IRQ work interrupts
IPI7: 0 0 completion interrupts
Err: 0

 

Max14830 transmit is working but receive is not working because of interrupt routine.

By the way We verified interrupt signal on the PL side trigger to high after we send a data to 14830.

 

So what is the problem? Is it wrong to use Axi-gpio interrupt ? I read somewhere linux software interrupts unable to bind  axi-gpio interrupts?

 

Regards,

 

0 Kudos