AnsweredAssumed Answered

Issue with configuring GPIO as an interrupt - i.MX6Q

Question asked by Jaymin Dabhi on Aug 18, 2017
Latest reply on Aug 27, 2017 by Jaymin Dabhi

Hi All,

 

I am trying to configure a GPIO as an interrupt in dts file of my i.MX6Q, but it is not configure.

I have i.MX6Q SoC with Pico-Nymph baseboard.

 

I can configure GPIOs as a GPIO-KEY in dts file and it is working properly. I get the entry in "/proc/interrupt" of gpio keys too.

 

My configuration in dts file is as below:

gpio-edm {
        status = "okay";
        compatible = "gpio-edm";
        pinctrl-0 = <&pinctrl_ext_gpio_nymph>;
        pinctrl-names = "default";

        int0: int {
            interrupt-controller;
            #interrupt-cells = <2>;

            interrupt-parent = <&gpio5>;
            interrupts = <20 2>;
        };
    };

and

pinctrl_ext_gpio_nymph: ext-gpio-grp-nymph {
            fsl,pins = <
                MX6QDL_PAD_CSI0_MCLK__GPIO5_IO19    0x4001b0b5 /* GPIO5_19 pico pin 24 */
                MX6QDL_PAD_CSI0_VSYNC__GPIO5_IO21    0x4001b0b5 /* GPIO5_21 pico pin 26 */
                MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20    0x4001b0b5 /* GPIO5_20 pico pin 28 */
                MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26    0x4001b0b5 /* GPIO5_26 pico pin 30 */
                MX6QDL_PAD_CSI0_DAT9__GPIO5_IO27    0x4001b0b5 /* GPIO5_27 pico pin xx */
                MX6QDL_PAD_CSI0_DAT12__GPIO5_IO30    0x4001b0b5 /* GPIO5_30 pico pin xx */
                MX6QDL_PAD_CSI0_DAT13__GPIO5_IO31    0x4001b0b5 /* GPIO5_31 pico pin 34 */
                MX6QDL_PAD_CSI0_DAT14__GPIO6_IO00    0x4001b0b5 /* GPIO6_00 pico pin xx */
                MX6QDL_PAD_CSI0_DAT15__GPIO6_IO01    0x4001b0b5 /* GPIO6_01 pico pin xx */
            >;
        };

I want to make GPIO5_IO20 as an interrupt.

 

Is GPIO configuration correct ?

What type of changes should I have to make ?

Share your suggestions.

 

Thanks,

Jaymin

Outcomes