03-26-2018 08:39 AM
I am newbie and working on a zcu102 with Petalinux 2017.4. My test project is rather simple. I connected to ZyqMP an Axi-gpio (dual connected to the 8 leds and 5 push buttons). I also activated the interrupt which is directly connected to the ZynqMP.(see attachment)
#gpio-cells = <0x2>;
#interrupt-cells = <0x2>;
compatible = "xlnx,xps-gpio-1.00.a";
interrupt-parent = <0x4>;
interrupts = <0x0 0x59 0x4>;
reg = <0x0 0xa0000000 0x0 0x1000>;
xlnx,all-inputs = <0x0>;
xlnx,all-inputs-2 = <0x1>;
xlnx,all-outputs = <0x1>;
xlnx,all-outputs-2 = <0x0>;
xlnx,dout-default = <0x55>;
xlnx,dout-default-2 = <0x0>;
xlnx,gpio-width = <0x8>;
xlnx,gpio2-width = <0x5>;
xlnx,interrupt-present = <0x1>;
xlnx,is-dual = <0x1>;
xlnx,tri-default = <0xffffffff>;
xlnx,tri-default-2 = <0xffffffff>;
I generated a custom module called fpga.ko (according to ug1144.pdf). I replaced the "compatible" name found in the driver with the name found in in plnx_aarch64-system.dts (See above")
My question is simple:
- When I run " insmod /lib......./extra/fpga.ko" i cannot see that the probe function is called (only init).Is it normal?
Should i run something else?
Any help will be welcome
03-26-2018 06:37 PM
To test AXI GPIO refer the wiki page http://www.wiki.xilinx.com/AXI%20GPIO
You no need to create a module you can use sysfs entries to test the drivers.
04-03-2018 01:45 AM
The problem is actually not from the gpio block. I tested it and I can see that it generates the(level) interrupt as expected. My problem is now that I try to use a dedicated module called "fpga". In the device tree I specified "compatible" as my driver name. I also built a generic module with petalinux-build and connected with the name specified in the device tree. when "insmod"ing my module, I can see that an interrupt is allocated (irq=53) . But I cannot catch any interrupt. THe number of detected interrupt does not change. (I run "cat /proc/interrupts" )
I have a feeling that the same problem is described in:
I will be very happy if uyou could solve this problem.
04-03-2018 01:56 AM
The original design has been modified . it looks like that now. I verified that I can either generate interrupt from the GPIO or the interrupt controller (axi_intc).