Re: [PATCH 4/4] pinctrl: mediatek: mt6797: Add EINT support

From: Roman Vivchar

Date: Wed Dec 02 2026 - 14:27:06 EST


On Wednesday, December 2nd, 2026 at 6:47 PM, Ben Grisdale via B4 Relay <devnull+bengris32.protonmail.ch@xxxxxxxxxx> wrote:

> From: Ben Grisdale <bengris32@xxxxxxxxxxxxx>
>
> The MT6797 EINT controller supports 192 external interrupts. 174 of
> these are routed to GPIOs, though EINT70-EINT72 are unusable as noted
> in the EINT table of the MT6797 functional specification [1].
>
> Among the GPIO EINTs, only EINT0-EINT15 provide debounce registers [2],
> sharing the same debounce time configuration as MT6765. The functional
> specification also marks EINT16 as debounced, but there is no debounce
> register for it.
>
> The EINT signals for the EINT0-EINT16 pins are only routed to the
> controller when they are set to their dedicated EINT function (mode 1).
> The other GPIO EINTs are routed to the controller by default in GPIO
> mode (mode 0).
>
> In addition to the EINTs wired to GPIOs, 12 EINTs are wired internally
> to the PMIC, the C2K modem and SSUSB. Define virtual GPIOs for these
> after the last real GPIO (GPIO262-GPIO273), as they have no physical
> pin. The remaining EINTs marked as "RESERVED" [1] are not included.
>
> Add the EINT number of each pin and describe the EINT hardware. Also
> use the Paris PM ops, which handle EINT wakeup sources during suspend.
>
> Link: https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Functional_Specification_V1_0.pdf [1]
> Link: https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Register_Table_Part_1.pdf [2]
> Signed-off-by: Ben Grisdale <bengris32@xxxxxxxxxxxxx>
> ---

Tested-by: Roman Vivchar <rva333@xxxxxxxxxxxxxx> # Xiaomi Redmi Note 4 (MTK)