Enable TCA8418 I2C Keypad Controller (with interrupt) on Device Tree (DTS)

Hi,

I want to add a TCA8418 I2C Keypad Controller to my Custom carrier board.
I would like to modify the imx6dl-colibri-v3.dts to support TCA8418 (I’m newbie about DTS configuration).

In my carrier I connect the TCA8418 to the standar Colibri imx6 I2C.

I add an “tca8418@34” paragraph to the imx6dl-colibri-v3.dts file (Inside “i2c3” paragraph, and after “rtc_i2c”).

Something like that:

&i2c3 {
 
    status = "okay";
    
    ....
   
    /* M41T0M6 real time clock on carrier board */
    rtc_i2c: rtc@68 {
    compatible = "st,m41t00";
    reg = <0x68>;
    };
    
    /* Add TCA8418 Support */
    tca8418@34 {
    compatible = "ti,tca8418"; 
    reg = <0x34>;
    interrupt-parent = <&gpio6>;
    interrupts = <17 0x2>; 
    keypad,num-rows = <8>;
    keypad,num-columns = <10>;
    linux,keymap = <
        0x0306003b
        0x0203003c
        0x02040057
        0x01080058
        ...
        0x06000111>;
    };
};

My questions are:

  • Which colibri-imx6 GPIO pin could I connect to the TCA8418 interrupt pin?.

  • How do I configure the interrupt in the DTS file?.
    How do I associate, interrupt-parent and interrupts with GPIO chosen physical interrupt in my carrier/colibri-imx6?.

Regards,

Peio