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.

Linux/PROCESSOR-SDK-AM437X: Keypad integration

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: AM4372

Tool/software: Linux

Hi,

we are using ti-sdk am437x. we facing issues with keypad. Except 2nd row, all other rows are working fine. what could be the reason for second row not working?

Following are the pin details in dts file.


matrix_keypad: matrix_keypad0 {
        compatible = "gpio-matrix-keypad";
        debounce-delay-ms = <5>;
        col-scan-delay-us = <2>;
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&matrix_keypad_default>;
        pinctrl-1 = <&matrix_keypad_sleep>;

        linux,wakeup;
    
        row-gpios = <&gpio0 22 GPIO_ACTIVE_LOW /* Bank0, pin3 */
                &gpio0 20 GPIO_ACTIVE_LOW  /* Bank4, pin3 */
            &gpio0 21 GPIO_ACTIVE_LOW /* Bank4, pin2 */
                &gpio0 23 GPIO_ACTIVE_LOW
             &gpio5 24 GPIO_ACTIVE_LOW>;

        col-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH /* Bank3, pin19 */
                &gpio5 7 GPIO_ACTIVE_HIGH /* Bank3, pin20 */
                &gpio5 1 GPIO_ACTIVE_HIGH
                &gpio5 12 GPIO_ACTIVE_HIGH>;
            linux,keymap =< 0x00000067      /* UP */
                               0x01000002         /* 1 */
                               0x02000005         /* 4 */
                               0x03000008         /* 7 */
                               0x04000034         /* . */

                               0x0001000C        /* - */
                              0x01010003         /* 2 */
                               0x02010006         /* 5 */
                               0x03010009         /* 8 */
                               0x0401000B        /* 0 */

                               0x0002006C      /* DOWN */
                               0x01020004         /* 3 */
                               0x02020007         /* 6 */
                               0x0302000A        /* 9 */
                               0x0402000B        /* 00 dont know key map */

                               0x00030019         /* P - dont know key map - leaving at reserved */
                               0x01030069      /* LEFT */
                               0x020300DF         /* CANCEL */
                               0x0303001C        /* Enter */
                               0x04030000         /* This key is not used or available in HW */
                              >;   
    };




matrix_keypad_default: matrix_keypad_default {
            pinctrl-single,pins = <
                /* Columns*/
                AM4372_IOPAD(0x950, PIN_OUTPUT | MUX_MODE7 ) /* (P23) spi0_sclk.gpio0[2] */
                AM4372_IOPAD(0xA5C,PIN_OUTPUT | MUX_MODE7 ) /* (N25) spi4_cs0.gpio5[7] */
                AM4372_IOPAD(0xA34, PIN_OUTPUT | MUX_MODE7 ) /* (K24) uart3_rtsn.gpio5[1] */
                AM4372_IOPAD(0xA48, PIN_OUTPUT | MUX_MODE7 ) /* (E25) gpio5_12.gpio5[12] */
                /* Rows */
                AM4372_IOPAD(0x828, PIN_INPUT | MUX_MODE7 ) /* (F11) gpmc_ad10.gpio0[26] */
                AM4372_IOPAD(0xA68, PIN_INPUT | MUX_MODE9 ) /* (P20) spi2_d1.gpio0[21] */
                AM4372_IOPAD(0xA64, PIN_INPUT | PULL_DISABLE | MUX_MODE9 ) /* (P22) spi2_d0.gpio0[20] */
                AM4372_IOPAD(0xA60, PIN_INPUT | MUX_MODE9 ) /* (N20) spi2_sclk.gpio0[22] */
                AM4372_IOPAD(0xA6C, PIN_INPUT | MUX_MODE9 ) /* (T23) spi2_cs0.gpio0[23] */
            >;
        };

        matrix_keypad_sleep: matrix_keypad_sleep {
            pinctrl-single,pins = <
                        /* Columns*/
                            AM4372_IOPAD(0x950, PIN_INPUT | MUX_MODE7 ) /* (P23) spi0_sclk.gpio0[2] */
                               AM4372_IOPAD(0xA5C, PIN_INPUT | MUX_MODE7 ) /* (N25) spi4_cs0.gpio5[7] */
                                AM4372_IOPAD(0xA34, PIN_INPUT | MUX_MODE7 ) /* (K24) uart3_rtsn.gpio5[1] */
                           AM4372_IOPAD(0xA48, PIN_INPUT | MUX_MODE7 ) /* (E25) gpio5_12.gpio5[12] */
                            /* Rows */
                            AM4372_IOPAD(0x828, PIN_INPUT | MUX_MODE7 ) /* (F11) gpmc_ad10.gpio0[26] */
                          AM4372_IOPAD(0xA68, PIN_INPUT | MUX_MODE9 ) /* (P20) spi2_d1.gpio0[21] */
                              AM4372_IOPAD(0xA64, PIN_INPUT | MUX_MODE9 ) /* (P22) spi2_d0.gpio0[20] */
                            AM4372_IOPAD(0xA60, PIN_INPUT | MUX_MODE9 ) /* (N20) spi2_sclk.gpio0[22] */
                        AM4372_IOPAD(0xA6C, PIN_INPUT | MUX_MODE9 ) /* (T23) spi2_cs0.gpio0[23] */
            >;
        };