No GPIO IRQ Support in ODYSSEY X86J4105 board

Hi, I have an ODYSSEY X86J4105, my use case is, I need to enable a PPS signal connected on a GPIO pin (phys pin 13 in the example), and for this I need to use GPIO IRQs.

I’ve run onto a dead end, I wrote a kernel module to enable a pps-gpio device using a GPIO as IRQ, which in turn is probed and detected by module pps-gpio pps client, and in turn registers it as a PPS source.

All of this works fine in other hardware, like raspberry PI (note that I’m avoiding the device tree to avoid incompatibilities).

I’m running Ubuntu 20.04, after trying to find out what was wrong with my code, I decided to give it a go using gpio tools, and tried with gpiomon which also binds a GPIO to an IRQ to monitor… and I got the same results.

As I said, in this example I’m using pin 13, but have tried other GPIOs. Same result.

Command:

$ gpiomon -f 1 60
gpiomon: error waiting for events: Operation not permitted

And this is logged:

==> /var/log/kern.log <==
Jun 17 02:46:45 tywin kernel: [ 8802.486251] geminilake-pinctrl INT3453:01: pin 60 cannot be used as IRQ
Jun 17 02:46:45 tywin kernel: [ 8802.486262] genirq: Setting trigger mode 2 for irq 153 failed (intel_gpio_irq_type+0x0/0x130 [pinctrl_intel])

The exact same effect/result as my code.

My conclusion is that there’s no IRQ support for GPIOs in the BIOS for interrupt requests (I saw the example labelled IRQ in https://wiki.seeedstudio.com/ODYSSEY-X86J4105-GPIO/#interrupts but that’s not using IRQs, it’s actually polling sysfs).

Is there any BIOS updates, or anyway to enable IRQs in this board?

I’ve found nothing useful or related in current BIOS settings.

Appreciate any help!

Regards,

GM

I am also trying similar thing using libgpiod library. gpiomon tool comes from this library.

Sorry for bumping this topic, but I am facing the same problem and woudl appreciate if somebody from Seeed at least clarifies that this is not possible.

My observation is that GPIO lines not under ACPI control can be configured for events (interrupt support) such as line 12 on /dev/gpiochip1 (physical pin 11). All other under ACPI control are not accessible and generate error like rhaseven7h already explained. If I turn off ACPI using kernel parameter, this renders Debian linux unbootable. So no cure for that so far. Poling sysfs is the only solution left :frowning:

So, for interrupt input configuration, we can use line 12 (pin 11), 38 (pin 22), and 39 (pin 32)

All the best,
Aleksandar

For anyone stumbling upon this thread, who wants to use a GPIO on the Odyssey x86
to get a PPS into chrony or ntp, there is: https://github.com/Jobbel/pps-gpio-dtless.

Thanks to dragulj who found out only pins 364, 390, 391 (in Linux GPIO numbering) can be used.

Regards,
Jobbel