Can I use P5020 IRQ pins as GPIOs while receiving legacy PCI interrupts?

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use P5020 IRQ pins as GPIOs while receiving legacy PCI interrupts?

415 Views
adriancox
Contributor III

The P5020 pins AJ13, AG17, and AM13 can be used as either GPIO or external interrupt (P5020 Hardware Specification p21, P5020RM table 3-9). If I set these pins to GPIO function using the RCW, can I still use all four legacy PCI interrupts on PCIe controller 2, which are mapped to IRQ5,6,7 (P5020RM table 25-3)?

On my current board Linux sees unexpected interrupts on these lines when set to GPIO mode, unless I both set the pins to interrupt mode and pull them up.

Labels (1)
Tags (2)
0 Kudos
3 Replies

95 Views
scottwood
NXP Employee
NXP Employee

You probably need to set the interrupt to be active high.  These are simulated legacy interrupts, not real external pins, so the usual need to set PCI interrupts as active low does not apply.

0 Kudos

95 Views
adriancox
Contributor III

Thanks - that may require a bit of work on the Linux setup code, which assumes they are active low because they are legacy PCI.

It's not looking like a problem for us now - all these lines on our board pass through a PLD, so we can easily change our usages to be compatible.

0 Kudos

95 Views
scottwood
NXP Employee
NXP Employee

Linux doesn't assume that -- it uses whatever level/sense in the device tree.  In this case you'd modify the interrupt-map in the PCIe node.

0 Kudos