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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

836 次查看
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.

标签 (1)
标记 (2)
0 项奖励
3 回复数

516 次查看
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 项奖励

516 次查看
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 项奖励

516 次查看
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 项奖励