Hi Biju, On Tue, 1 Jul 2025 at 13:40, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote: > > From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> > > On Mon, 14 Apr 2025 at 17:38, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote: > > > RZ/G3E SMARC EVK has 3 user buttons called USER_SW1, USER_SW2 and > > > USER_SW3. Add a DT node in device tree to instantiate the gpio-keys > > > driver for these buttons. > > > > > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > > > --- a/arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi > > > +++ b/arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi > > > @@ -12,8 +12,13 @@ > > > * SW_SDIO_M2E: > > > * 0 - SMARC SDIO signal is connected to uSD1 > > > * 1 - SMARC SDIO signal is connected to M.2 Key E connector > > > + * > > > + * GPIO keys are enabled by default. Use PMOD_GPIO macros to disable > > > + them > > > + * if needed. > > > */ > > > > > > +#include <dt-bindings/input/input.h> > > > + > > > / { > > > model = "Renesas RZ SMARC Carrier-II Board"; > > > compatible = "renesas,smarc2-evk"; @@ -27,6 +32,31 @@ aliases > > > { > > > serial3 = &scif0; > > > mmc1 = &sdhi1; > > > }; > > > + > > > + keys: keys { > > > + compatible = "gpio-keys"; > > > + > > > + key-1 { > > > + interrupts-extended = <&pinctrl KEY_1_GPIO > > > + IRQ_TYPE_EDGE_FALLING>; > > > > So you are using them as interrupts. Don't you need to configure pin control for that (function 15 = > > IRQ14)? > > The same pin can be configured as TINT or IRQ15, currently it is configured as TINT IRQ. > Is it ok? OK. > > Alternatively, can't you use them as gpios with interrupt facilities? > > interrupts-extended = <&pinctrl KEY_1_GPIO IRQ_TYPE_EDGE_FALLING>; > > The TINT IRQ will provide the same right? Am I missing anything here? When you use interrupts directly, the system will detect only key presses, and fake (timer-based) key releases. When you use GPIOs with interrupt-capability, the system can detect both key presses and releases. See also commit cab3511ea7a0b1fc ("ARM: dts: marzen: Add slide switches"). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds