GPIO-KEY Overlay in Lakka 2.1.1 Not Working

Hey All

I’ve set up a RPi with latest build. Lakka 2.1.1 for my kids It in one of those NES cases

I’m attempting to use the GPIO for a few buttons, and as i understand, GPIO-KEY DT Overlay is confirmed to be in the overlay folder of the latest build.

Here is what i am adding to my config.txt

dtoverlay=gpio-key,gpio=26,label=STOP,keycode=105                          # doesn't work
# dtoverlay=gpio-key,gpio=26,label=STOP,keycode=KEY_LEFT           # doesn't work
# dtoverlay=gpio-key,gpio=GPIO26,label=STOP,keycode=105             # doesn't work
# dtoverlay=gpio-key,gpio=GPIO26,label=STOP,keycode=KEY_LEFT  # doesn't work

Anyway, thought i’d ask if anyone has had success with using this overlay

@Kivutar any thoughts here?

New issue in GitHub

I will love to see some answers in this post! Trying to build a portable RPI with Lakka. I’ve been watching this for months. Have you tryed the new 2.1.2 version?

A few solutions

  1. https://github.com/32teeth/Lakka-For-Gaboze-Pocaio
  2. https://github.com/32teeth/Generic-ILI9342

@32teeth

Hi I’m trying to configure GPIO on my raspberry 4 with Lakka 2.3.2 . I’ve 2 joystick (4pin) and 6 button per player.

I tried different way using gpio-keys but I can’t figure out alone. It’s my first implementation of this.

Can you help me?

I tried to do a dts file like this

/dts-v1/; /plugin/;

/ { compatible = “brcm,bcm2711”;

    fragment@0 {
            target = <&gpio>;
            __overlay__ {
                    picade_pins: picade_pins {
                            brcm,pins = <4 17 27 22>;
                            brcm,function = <0>;
                            brcm,pull = <2>;
                    };
            };
    };

    fragment@1 {
            target-path = "/";
            __overlay__ {
                    gpio_keys: gpio_keys {
                            compatible = "gpio-keys";
                            pinctrl-names = "default";
                            pinctrl-0 = <&picade_pins>;
                            status = "okay";

                            up: up {
                                    label = "Up";
                                    linux,code = <103>;
                                    gpios = <&gpio 4 1>;
                            };

                            down: down {
                                    label = "Down";
                                    linux,code = <108>;
                                    gpios = <&gpio 17 1>;
                            };

                            left: left {
                                    label = "Left";
                                    linux,code = <105>;
                                    gpios = <&gpio 27 1>;
                            };

                            right: right {
                                    label = "Right";
                                    linux,code = <106>;
                                    gpios = <&gpio 22 1>;
                            };
                    };
            };
    };

};