Hi Biju, 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> Thanks for your patch, which conflicts with your CANFD patch that I have just applied. > --- a/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts > +++ b/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts > @@ -8,9 +8,18 @@ > /dts-v1/; > > /* Switch selection settings */ > +#define SW_LCD_EN 0 > #define SW_SD0_DEV_SEL 0 > #define SW_SDIO_M2E 0 > > +#define PMOD_GPIO4 0 > +#define PMOD_GPIO6 0 > +#define PMOD_GPIO7 0 > + > +#define KEY_1_GPIO RZG3E_GPIO(3, 1) > +#define KEY_2_GPIO RZG3E_GPIO(8, 4) > +#define KEY_3_GPIO RZG3E_GPIO(8, 5) Please drop the extra spaces after the define keywords. > + > #include <dt-bindings/gpio/gpio.h> > #include <dt-bindings/pinctrl/renesas,r9a09g047-pinctrl.h> > #include "r9a09g047e57.dtsi" > @@ -33,6 +42,24 @@ vqmmc_sd1_pvdd: regulator-vqmmc-sd1-pvdd { > }; > }; > > +&keys{ > +#if PMOD_GPIO4 > + /delete-node/ key-1; > +#endif > + > +#if SW_LCD_EN || PMOD_GPIO6 > + /delete-node/ key-2; > +#endif > + > +#if SW_LCD_EN || PMOD_GPIO7 > + /delete-node/ key-3; > +#endif > +}; > + > +#if SW_LCD_EN && PMOD_GPIO4 && PMOD_GPIO6 && PMOD_GPIO7 "PMOD_GPIO4 && (SW_LCD_EN || (PMOD_GPIO6 && PMOD_GPIO7))"? > + /delete-node/ keys; > +#endif > + > &pinctrl { > scif_pins: scif { > pins = "SCIF_TXD", "SCIF_RXD"; > diff --git a/arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi b/arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi > index fd82df8adc1e..84fb955ad77b 100644 > --- 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)? Alternatively, can't you use them as gpios with interrupt facilities? > + linux,code = <KEY_1>; > + label = "USER_SW1"; > + debounce-interval = <20>; > + }; > + > + key-2 { > + interrupts-extended = <&pinctrl KEY_2_GPIO IRQ_TYPE_EDGE_FALLING>; > + linux,code = <KEY_2>; > + label = "USER_SW2"; > + debounce-interval = <20>; > + }; > + > + key-3 { > + interrupts-extended = <&pinctrl KEY_3_GPIO IRQ_TYPE_EDGE_FALLING>; > + linux,code = <KEY_3>; > + label = "USER_SW3"; > + debounce-interval = <20>; > + }; > + }; > }; > > &scif0 { 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