This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x GPIO interrupt not detected

Other Parts Discussed in Thread: AM3351

In our custom board based on am3351, we have connected a Switch to GPIO1_29.  The switch circuit is shown as below

In dts, I configured the GPIO1_29 as follow

media_keys_s0: media_keys_s0 {
pinctrl-single,pins = <

0x7c ( PIN_INPUT_PULLUP | MUX_MODE7 ) /* gpmc_csn0.gpio1[29] */

};

gpio_keys: volume_keys@0 {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;

pinctrl-names = "default";
pinctrl-0 = <&media_keys_s0>;

switch@1 {

label = "playlist";
linux,code = <163>;
gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
gpio-key,wakeup;
};
};

After device boot, I tried to capture the input event of the switch. But it is not sending any event to userspace. During switch press, I directly read the GPIO input data register(devmem2 0x4804C138), it always show high for GPIO1_29 pin, except one or two times it goes to zero. Then I manually exported the GPIO1_29 using sys/class/gpio (only mux configuration added into dts). Now I was able to toggle the GPIO1_29 pin by configuring the direction as output. But when I set the direction as input, the value always shows high during switch press, except one or two times it goes to zero.