Hi,

I have connected 4x4 matrix keypad to BBB. I am trying to configure it in 
Device Tree, I spent a couple of hours but no effects. Snippet of my kernel 
config:

# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADP5588 is not set
# CONFIG_KEYBOARD_ADP5589 is not set
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT1070 is not set
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_LKKBD is not set
CONFIG_KEYBOARD_GPIO=y
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_TCA8418 is not set
CONFIG_KEYBOARD_MATRIX=y

I have based on snippets from am335x_evm.dts content to create my .dts 
file. File content:

/* 
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ 
 * 
 * This program is free software; you can redistribute it and/or modify 
 * it under the terms of the GNU General Public License version 2 as 
 * published by the Free Software Foundation. 
 */ 
/dts-v1/; 
/plugin/; 

/ { 
    compatible = "ti,beaglebone", "ti,beaglebone-black"; 

    /* identification */ 
    part-number = "RT-IMW1-KEYPAD"; 
    version = "00A1";

    fragment@0 {    
        target = <&ocp>;     
        __overlay__ 
        {
            matrix_keypad: matrix_keypad@0 {

            compatible = "gpio-matrix-keypad";
            debounce-delay-ms = <5>;
            col-scan-delay-us = <2>;

            row-gpios = <&gpio1 20 0x01    
                     &gpio1 7 0x01      
                     &gpio1 22 0x01     
                     &gpio1 27 0x01>;      

            col-gpios = <&gpio4 14 0x01     
                     &gpio2 29 0x01   
                     &gpio4 15 0x01     
                     &gpio4 16 0x01>;        

            linux,keymap = <
                    0x0000001e 
                    0x00010030 
                    0x0002002e 
                    0x00030020 
                    0x01000012 
                    0x01010021 
                    0x01020022 
                    0x01030023 
                    0x0200000b 
                    0x02010002 
                    0x02020003 
                    0x02030004 
                    0x03000005 
                    0x03010006 
                    0x03020007 
                    0x0303001c 
                    >;
            };    
        }; 
    };

    fragment@1 {
        target = <&am33xx_pinmux>;
        __overlay__ {

        pinctrl-names = "default";
        pinctrl-0 = <&matrix_keypad_s0>;
        matrix_keypad_s0: matrix_keypad_s0 {

            pinctrl-single,pins = <
                /*INPUTS*/ 
                0x1b4 0x07 
                0x164 0x07 
                0x020 0x07 
                0x02c 0x07 
                /*Outputs*/ 
                0x190 0x07 
                0x07c 0x07 
                0x194 0x07 
                0x198 0x07 
            >;
            
            };
        };
    };
};

I have compiled and loaded successfully .dtbo files to cape manager (UART, 
CAN, LCD) and everything works fine but I still can't launch matrix keypad.

Could you tell me what I am doing wrong?

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to