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
Adventurer
Adventurer
493 Views
Registered: ‎02-19-2018

Device tree interrupt number for PL-PS interrupt

Jump to solution

In the Zynq MPSoC technical reference manual (p. 306), I see that the IRQ for PL interrupt 0 is 121. However, in the auto-generated device tree from Xilinx I found that it was using IRQ 89. At first I thought this might have been a bug, but after searching around for a bit, I found this post in the Xilinx support forums:

https://forums.xilinx.com/t5/Embedded-Linux/mapping-irq-number-into-device-tree-value/td-p/697418

That post says that you have to add 32 to the number in the device tree to arrive at the IRQ listed in the TRM. Sure enough, 89 + 32 = 121, so all is well.

However, what's not clear to me is how was I supposed to know that I needed to add this magical number 32? I've read through the Interrupts section of the TRM a few times now and haven't found anything that mentions this. I also read the blog post linked in the forum post above where he also mentions this offset of 32, but the question remains -- how did the blog post author know about the 32 offset?

I am obviously missing something, perhaps something obvious. Can anyone help clear this up for me?

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
470 Views
Registered: ‎06-27-2017

Re: Device tree interrupt number for PL-PS interrupt

Jump to solution

Hi @greande ,

Generally Shared peripheral interrupts has their own ids starts from 32.

System has reserved interrupt id's from 0-31(private interrupts). SPI's can be routed to cpu or PL. So the IRQ number mentioned is SPI(specific to peripheral) id. To achieve the actiual IRQ id you have to add 32 to the interrupt number in device tree. you can refer GICv2 document for better understanding the interrupt numbers

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

View solution in original post

0 Kudos
1 Reply
Moderator
Moderator
471 Views
Registered: ‎06-27-2017

Re: Device tree interrupt number for PL-PS interrupt

Jump to solution

Hi @greande ,

Generally Shared peripheral interrupts has their own ids starts from 32.

System has reserved interrupt id's from 0-31(private interrupts). SPI's can be routed to cpu or PL. So the IRQ number mentioned is SPI(specific to peripheral) id. To achieve the actiual IRQ id you have to add 32 to the interrupt number in device tree. you can refer GICv2 document for better understanding the interrupt numbers

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

View solution in original post

0 Kudos