drivers: interrupt_controller: Add XMC4XXX ERU driver

In Infineon XMC4XXX SoCs, gpio interrupts are triggered via an
Event Request Unit (ERU) module. A subset of the gpios are
connected to the ERU. The ERU monitors edge triggers and creates
a SR.

This driver configures the ERU for a target port/pin combination
for rising/falling edge events. Note that the ERU module does
not generate SR based on the gpio level. Internally the ERU
tracks the *status* of an event. The status is set on a positive
edge and unset on a negative edge (or vice-versa depending on
the configuration). The value of the status is used to implement
a level triggered interrupt; The ISR checks the status flag and
calls the callback function if the status is set.

The ERU configurations for supported port/pin combinations are
stored in a devicetree file dts/arm/infineon/xmc4xxx_x_x-intc.dtsi.
The configurations are stored in the opaque array
uint16 port_line_mapping[].

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
This commit is contained in:
Andriy Gelman 2022-07-21 14:33:28 -04:00 committed by Carles Cufí
commit 727e589448
12 changed files with 400 additions and 0 deletions

View file

@ -19,4 +19,10 @@ config HAS_XMCLIB_FLASH
bool
help
Enable XMCLIB Flash
config HAS_XMCLIB_ERU
bool
help
Enable XMCLIB Event Request Unit (ERU) for GPIO interrupt support
endif # HAS_XMCLIB