Hi,
I’m currently struggling with a fairly basic problem.
I want to use a GPIO of the BeagleY-AI via gpio-key driver as a trigger.
For a quick test, I tried using the internal pull-up, so that I wouldn’t need to use an external pu.
Inside k3-am67a-beagley-ai.dts
I added the following node.
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&hat_36_gpio_pu>;
key {
label = "S1-BTN";
/* HAT 36 (GPIO 16) */
gpios = <&main_gpio1 7 GPIO_ACTIVE_LOW>;
linux,code = <30>;
};
};
Inside k3-am67a-beagley-ai-pinmux.dtsi
is the already existing definition for HAT Pin 36 with GPIO PU definition:
hat_36_gpio_pu: hat-36-gpio-pu-pins {
pinctrl-single,pins = <
J722S_IOPAD(0x194, PIN_INPUT_PULLUP, 7) /* (A25) MCASP0_AXR3.GPIO1_7 */
>;
};
The event node is created and useable, so no issue here.
$ ls -l /dev/input/by-path/platform-gpio-keys-event
lrwxrwxrwx 1 root root 9 Aug 11 08:49 /dev/input/by-path/platform-gpio-keys-event -> ../event0
However, regardless of the configuration (pu/pd), the pin is always floating.
Of course I could use an external PU resistor, but I just wonder why that config has no effect.
Does anyone know if I’m missing something or have misunderstood something?