AnsweredAssumed Answered

MX6ul-var-dart dtsi for gpio input only on falling edge

Question asked by Nirmal Panchal on Apr 6, 2017
Latest reply on Apr 12, 2017 by Nirmal Panchal


I have started learning device tree for mx6ul and tried to configure the pins as an input or output for EVK board I have with me. It is imx6ul-var6ul-dart EVK board.

I want to configure GPIO pins for the board using device tree with interrupt on falling edge.

I did following :


gpio_keys_in {
        compatible = "gpio-keys";
        #address-cells = <1>;
        #size-cells = <0>;


        DI0 {
            label = "GPIO_DI0";
            linux,code = <103>;
            pinctrl-names = "default";
            pinctrl-0 = <&pinctrl_dio1>;
            gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;


            /* interrupt properties may be omitted if used gpios property */
            interrupt-parent = <&gpio5>;
            interrupts = <8 IRQ_TYPE_EDGE_FALLING>;


and defined pinctrl_dio1 as

pinctrl_dio1: gpio_keys_di_pins@0 {
            fsl,pins = <
                MX6UL_PAD_SNVS_TAMPER8__GPIO5_IO08    0x80000000    /* DI1 */


GPIO works as it should , It is working properly as an input pin.

But it triggers interrupt on both rising and falling edges. According to definition as above

interrupts = <8 IRQ_TYPE_EDGE_FALLING>;

It should only trigger interrupt on the falling edge. But for some reason it do on both the edges.

I want gpio input with only falling edge trigger interrupt.


Can somebody tell me what I am doing wrong here ????