Interrupt-capable pins on aml-s905x-cc

I want to use two pins on the AML-S905X-CC, pins 16 and 18 on header 7J1, as interrupt inputs. Would it be possible to confirm if those are interrupt-capable or if most/all of the available GPIO pins are?

Not sure about the state of interrupts on specific pins but you can google meson pinctrl interrupt. I faintly remember there being some limitations about the number of interrupts. Jerome did it 5 years ago when we first launched Le Potato so best to check and test.

Thanks! From what I can find the interrupt controller in the Meson chips presents 8 hardware interrupts in total, that can be mapped to nearly any GPIO pin. I can see various iterations of kernel patches from ~2016-2017, I’ll see if I can find the equivalent references in the current kernel version.

1 Like

This seems to be related: GPIOMON does not work on a Le Potato running your suggested Ubuntu image - #4 by Brad_Wigton

I think Armbian with its Linux 5.10 kernel supports the 8 interrupts. I’m not sure why this is not working in Linux 5.19. We are researching this issue.

Thanks! I have not gotten around to writing the dts overlay files I needed yet but I will look at Armbian as well.

Just to update you, the Amlogic GXL family has an interrupt controller that is able to monitor up to 8 interrupts. Each monitored interrupt can be falling or rising edge and monitoring both counts as 2 interrupts. So it’s very limited and reserved mostly for device-tree bound devices. You can look at the dtoverlays in the libretech-wiring-tool to see how it’s done. Due to the small number of monitorable interrupts, it is easy to exceed this if gpio_to_irq is enabled so upstream decided to leave that disabled for this SoC family. This effectively prevents gpiomon from working.

That works, thank you. I have been using spicc-ce1-ads7846-irq-22.dts and spicc-mcp2515-can0.dts as references to write overlays for PPS and the SC16IS752 (and ultimately more variants for SC16IS75x/76x) but have been short on time to work on it.

1 Like

Feel free to send a pull request if it is a mass market peripheral! As long as the licensing terms are compatible with GPL 2.0.

In this specific case it’s just a custom board for my personal use, but the SC16IS75x/76x family are commonly used SPI/I2C to RS232 from NXP (1 or 2 rs232 ports depending on variants) present on a number of Pi hats, and an overlay for PPS would be useful for anyone who wants to interface a GPS receiver to the S905x for timing purposes (ntp time server, etc.)

I will share the overlay files when they are ready and tested.

2 Likes

Maes, any update on an overlay for PPS? I’ve been trying to write one but get an error from the kernel that it can’t allocate an interrupt: pps-gpio pps: failed to map GPIO to IRQ: -6

1 Like