11-06-2020 03:07 AM
Our target is ZyncMP (UltraZed SOM module) and we are using 2017.4 petalinux/Vivado toolchain.
We are facing a strange behaviour with 2 MIO GPIOs configured as inputs. These 2 inputs are configured to raise interrupts :
- GPIO1 interrupt is caught by gpio-keys driver and used by application to power on a display backlight
- GPIO2 interrupt is caught by touchscreen driver ads7843 ("pen" irq).
On our mother board, we have SD card and eMMC interfaces. When an SD card is inserted, we get no issue on the backlight GPIO1. But when SD card is not inserted, Linux kernel don't catch interrupts anymore (we use /sys/class/interrupts to verify it), whereas interrupt electrical signal is ok on the pin (we checked it using an oscilloscope).
On GPIO2 pin, sometimes (very rarely) we lose pen irq interrupts, touchscreen don't respond to requests and display is not usable anymore (all other interrupts are working well).
We applied a patch to gpio-zync.c (https://github.com/Xilinx/linuxxlnx/commit/5ca6297f224b9ebb05409665df4b8f289826d770#diff45cd48fec459e7e2bff5244d9cf63bb4a45cc5dddf7ff92db33797f3cbb68968) that fixes an irq restore context bug, but GPIO1 strange behaviour is still there... We don't know if GPIO2 issue is fixed as it is very hard to reproduce.