Hi, when using the gpio-keys hack to allow gpio wake i am seein the following issues:
- Some GPIO appears to latch after one interrupt is fired.
- One gpio appears to be level triggered even though it’s set to edge. Interrupts are continually fired which blocks the system and cpu stall is detected.
DTS
pinmux@2430000 {
pinctrl-names = "default";
pinctrl-0 = <&pinmux_default>;
pinmux_default: common {
can_gpio2_paa2 {
nvidia,pins = "can_gpio2_paa2";
nvidia,function = "gpio";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
gpio_sw2_pff2 {
nvidia,pins = "gpio_sw2_pff2";
nvidia,function = "rsvd0";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
gpio_pq6_pi6 {
nvidia,pins = "gpio_pq6_pi6";
nvidia,function = "rsvd0";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
};
};
gpio-keys {
compatible = "gpio-keys";
/delete-node/ volume_down;
/delete-node/ volume_up;
/delete-node/ power;
ttb-wake {
label = "ttb-wake";
gpios = <&tegra_main_gpio TEGRA_MAIN_GPIO(I, 6) GPIO_ACTIVE_LOW>;
linux,code = <BTN_9>;
gpio-key,wakeup;
};
aux1-wake {
label = "aux1-wake";
gpios = <&tegra_aon_gpio TEGRA_AON_GPIO(AA, 2) GPIO_ACTIVE_LOW>;
linux,code = <BTN_8>;
gpio-key,wakeup;
};
aux2-wake {
label = "aux2-wake";
gpios = <&tegra_aon_gpio TEGRA_AON_GPIO(FF, 2) GPIO_ACTIVE_LOW>;
linux,code = <BTN_7>;
gpio-key,wakeup;
};
};
root@tegra-ubuntu:~# cat /sys/kernel/debug/gpio | grep -E “aux|ttb”
gpio-298 ( |aux1-wake ) in hi
gpio-314 ( |aux2-wake ) in lo
gpio-390 ( |ttb-wake ) in lo
gpio314 and gpio390 are stuck low after being pulled to gnd and then released.
root@tegra-ubuntu:~# cat /proc/interrupts | grep -E “aux|ttb”
200: 1 0 0 0 tegra-gpio 70 Edge ttb-wake
365: 138973 0 0 0 tegra-gpio-aon 42 Edge aux1-wake
381: 1 0 0 0 tegra-gpio-aon 58 Edge aux2-wake
gpio365, when held low, continually fires.
Any help would be appreciated.
Regards,
Chris