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
Observer zaku89
Observer
369 Views
Registered: ‎05-30-2018

PL-PS INTERRUPT on Ultrazed on Petalinux

Jump to solution

I am trying to get an interrupt generated from PL side on PS side on Petalinux 2017.4.
But I can not get any interrupts.

The interrupt is generated from PL(FPGA), and is configured and generated automaticllyin the dts of Petalinux as follow:
in pl.dtsi:
    TriggerGen_IP_0: TriggerGen_IP@80001000 {
                        compatible = "xlnx,TriggerGen-IP-2.1";
                        interrupt-parent = <&gic>;
                        interrupts = <0 89 4 0 90 4>;
                        reg = <0x0 0x80001000 0x0 0x1000>;
                        xlnx,s00-axi-addr-width = <0x8>;
                        xlnx,s00-axi-data-width = <0x20>;
                };

 interrupts = <0 89 4

Here does this 4 means high level trigger type?

But my IP will only generate a edge trigger interrupt. So should I modify this dts manually to be 1 ? or is there any other methods?

Besides, I can not see this interrupt from cat /proc/interrupts

 

Is there anything I missed?

 

PS: This interrupt from PL (89) has been verified on bare metal applications. The GIC no is 121.

Does anyone can help?

Thank you!

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
330 Views
Registered: ‎09-12-2007

Re: PL-PS INTERRUPT on Ultrazed on Petalinux

Jump to solution

Yes, add this to the system-user.dtsi in the devicetree recipe in the Petalinux Project directory. You might also need to update the bootargs too.

Note: there is a typo in the wiki, you just need one &, as shown below:

/include/ "system-conf.dtsi"
/ {
    chosen {
        bootargs = "earlycon clk_ignore_unused   uio_pdrv_genirq.of_id=generic-uio";
        stdout-path = "serial0:115200n8";
    };
};
  
&axi_gpio_0 {
    compatible = "generic-uio";
};

 

The device tree generator uses the pin properties in the IPI project to set the sensitivity. For example:

pin_sen.PNG

If not set it prob just defaults to level high

So you could change this in your HW and export to SDK to regenerate the HDF and regenerate the DT. Or just manually change this in the device tree to match your HW

 

0 Kudos
4 Replies
Moderator
Moderator
355 Views
Registered: ‎09-12-2007

Re: PL-PS INTERRUPT on Ultrazed on Petalinux

Jump to solution

is this a custom IP? If so, you would need to create a custom driver to register/handle the interrupt in Linux. If you don't want to create a driver, you can use the UIO driver.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842490/Testing+UIO+with+Interrupt+on+Zynq+Ultrascale

 

 

0 Kudos
Observer zaku89
Observer
336 Views
Registered: ‎05-30-2018

Re: PL-PS INTERRUPT on Ultrazed on Petalinux

Jump to solution

Yes, it is a custom IP with 2 edge signal every 100 us.

I don't want to create a driver if UIO can work.

For UIO solution:

According to the link you shared, should I just add this in the system-user.dtsi?

&&TriggerGen_IP_0 {
    compatible = "generic-uio";
};

But where to set the trigger type to be edge? The one automatically in pl.dts is level trigger. If I modify the pl.dts, build will overwrite it.

TriggerGen_IP_0: TriggerGen_IP@80001000 {
                        compatible = "xlnx,TriggerGen-IP-2.1";
                        interrupt-parent = <&gic>;
                        interrupts = <0 89 4 0 90 4>;
                        reg = <0x0 0x80001000 0x0 0x1000>;
                        xlnx,s00-axi-addr-width = <0x8>;
                        xlnx,s00-axi-data-width = <0x20>;
                };
 
 
 
0 Kudos
Moderator
Moderator
331 Views
Registered: ‎09-12-2007

Re: PL-PS INTERRUPT on Ultrazed on Petalinux

Jump to solution

Yes, add this to the system-user.dtsi in the devicetree recipe in the Petalinux Project directory. You might also need to update the bootargs too.

Note: there is a typo in the wiki, you just need one &, as shown below:

/include/ "system-conf.dtsi"
/ {
    chosen {
        bootargs = "earlycon clk_ignore_unused   uio_pdrv_genirq.of_id=generic-uio";
        stdout-path = "serial0:115200n8";
    };
};
  
&axi_gpio_0 {
    compatible = "generic-uio";
};

 

The device tree generator uses the pin properties in the IPI project to set the sensitivity. For example:

pin_sen.PNG

If not set it prob just defaults to level high

So you could change this in your HW and export to SDK to regenerate the HDF and regenerate the DT. Or just manually change this in the device tree to match your HW

 

0 Kudos
Observer zaku89
Observer
304 Views
Registered: ‎05-30-2018

Re: PL-PS INTERRUPT on Ultrazed on Petalinux

Jump to solution

Hi Stephenm,

 

Thank you for your answer!

I have modified the system-user.dtsi as follow:

/include/ "system-conf.dtsi"
/ {
};

/ {
chosen {
bootargs = "earlycon clk_ignore_unused earlyprintk root=/dev/mmcblk1p2 rw rootwait rootfstype=ext4 mem=1024M uio_pdrv_genirq.of_id=generic-uio";
};



};

&TriggerGen_IP_0 {
compatible = "generic-uio";
interrupts = <0 89 1 0 90 1>;
};

And then I can see it and get the interrupt of 89.

The IP will generate another interrupt and I connect to the 90.  But I can not get the interrupt of 90.

Do you know how to make the second interrupt also work?

Thank you!

0 Kudos