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
Contributor
Contributor
1,448 Views
Registered: ‎04-06-2018

modify device tree for new Interrypt from PL

Jump to solution

Hi ,

I am trying to add a new IRQ in my device tree to handle the interrupt that comes from my PL.

I have a zturn board with zynq 07z020, from the kit I have a zynq-zturn.dts file , which I added a pl.dtsi file

that I got from petalinux (I was trying to generate my dtb from my bit file from Vivado).

I am lost regarding where I have to edit or modify the dts or dtsi , I noticed that petalinux ,

created the pl.dtsi and has the right addresses from the peripherals mapped into memmory axi_vdma_0 and v_tc_0, then I added at the bottom :

observer: observer@44000000 {
                    compatible = "xlnx,observer-1.01.a";
                    interrupt-names = "irq2";
                    interrupts = <0 32 1>;
                    interrupt-parent = <&gic>;
                    reg = < 0x44000000 0x10000 >;
            } ;

 

my current IRQ list from cat /proc/interrupts is :

 

\0x1b[0;31mZ-turn#\0x1b[m cat /proc/interrupts

CPU0 CPU1

29: 234 220 GIC 29 twd

35: 0 0 GIC 35 f800c000.ocmc

39: 43 0 GIC 39 f8007100.adc

40: 0 0 GIC 40 f8007000.devcfg

41: 0 0 GIC 41 f8005000.watchdog

43: 7846 0 GIC 43 ttc_clockevent

45: 0 0 GIC 45 f8003000.dmac

46: 0 0 GIC 46 f8003000.dmac

47: 0 0 GIC 47 f8003000.dmac

48: 0 0 GIC 48 f8003000.dmac

49: 0 0 GIC 49 f8003000.dmac

51: 3 0 GIC 51 e000d000.spi

53: 0 0 GIC 53 ehci_hcd:usb1

54: 0 0 GIC 54 eth0

56: 58 0 GIC 56 mmc0

57: 32 0 GIC 57 cdns-i2c

61: 1 0 GIC 61 SII902x_det

62: 0 0 GIC 62 xilinx-vdma-controller

63: 0 0 GIC 63 0-0053

72: 0 0 GIC 72 f8003000.dmac

73: 0 0 GIC 73 f8003000.dmac

74: 0 0 GIC 74 f8003000.dmac

75: 0 0 GIC 75 f8003000.dmac

82: 51 0 GIC 82 xuartps

146: 0 0 zynq-gpio 50 K1

IPI1: 0 39 Timer broadcast interrupts

IPI2: 623 370 Rescheduling interrupts

IPI3: 0 0 Function call interrupts

IPI4: 79 28 Single function call interrupts

IPI5: 0 0 CPU stop interrupts

IPI6: 8 14 IRQ work interrupts

IPI7: 0 0 completion interrupts

Err: 0

 

Best Regards.

 

 

 

 

 

 

 

project.png
address.png
0 Kudos
1 Solution

Accepted Solutions
Contributor
Contributor
1,512 Views
Registered: ‎04-06-2018

Re: modify device tree for new Interrypt from PL

Jump to solution

I have a zturn board , and what I did to get my IRQ in the /proc/interrupts was to modify the file

zynq-zturn-xylon.dtsi where I added a new block based on some tip from https://forum.digilentinc.com/topic/9174-linux-driver/

 

amba_pl {
        #address-cells = <0x1>;
        #size-cells = <0x1>;
        compatible = "simple-bus";
        ranges;

        gpio2@43c20000 {
            #gpio-cells = <0x2>;
            #interrupt-cells = <0x2>;
            compatible = "generic-uio";
            gpio-controller;
            interrupt-controller;
            interrupt-parent = <0x4>;
            interrupts = <0x0 0x20 0x4>;
            reg = <0x43c20000 0x10000>;
            xlnx,all-inputs = <0x1>;
            xlnx,all-inputs-2 = <0x0>;
            xlnx,all-outputs = <0x0>;
            xlnx,all-outputs-2 = <0x0>;
            xlnx,dout-default = <0x0>;
            xlnx,dout-default-2 = <0x0>;
            xlnx,gpio-width = <0x3>;
            xlnx,gpio2-width = <0x20>;
            xlnx,interrupt-present = <0x1>;
            xlnx,is-dual = <0x0>;
            xlnx,tri-default = <0xffffffff>;
            xlnx,tri-default-2 = <0xffffffff>;
        };
};

 

then I do see my IRQ on the list, I don't know if this is the best solution but it is my progress up to now.

 

0 Kudos
2 Replies
Contributor
Contributor
1,513 Views
Registered: ‎04-06-2018

Re: modify device tree for new Interrypt from PL

Jump to solution

I have a zturn board , and what I did to get my IRQ in the /proc/interrupts was to modify the file

zynq-zturn-xylon.dtsi where I added a new block based on some tip from https://forum.digilentinc.com/topic/9174-linux-driver/

 

amba_pl {
        #address-cells = <0x1>;
        #size-cells = <0x1>;
        compatible = "simple-bus";
        ranges;

        gpio2@43c20000 {
            #gpio-cells = <0x2>;
            #interrupt-cells = <0x2>;
            compatible = "generic-uio";
            gpio-controller;
            interrupt-controller;
            interrupt-parent = <0x4>;
            interrupts = <0x0 0x20 0x4>;
            reg = <0x43c20000 0x10000>;
            xlnx,all-inputs = <0x1>;
            xlnx,all-inputs-2 = <0x0>;
            xlnx,all-outputs = <0x0>;
            xlnx,all-outputs-2 = <0x0>;
            xlnx,dout-default = <0x0>;
            xlnx,dout-default-2 = <0x0>;
            xlnx,gpio-width = <0x3>;
            xlnx,gpio2-width = <0x20>;
            xlnx,interrupt-present = <0x1>;
            xlnx,is-dual = <0x0>;
            xlnx,tri-default = <0xffffffff>;
            xlnx,tri-default-2 = <0xffffffff>;
        };
};

 

then I do see my IRQ on the list, I don't know if this is the best solution but it is my progress up to now.

 

0 Kudos
Moderator
Moderator
1,372 Views
Registered: ‎09-12-2007

Re: modify device tree for new Interrypt from PL

Jump to solution
0 Kudos