iMX6Q kpp matrix keyboard driver not work -help

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMX6Q kpp matrix keyboard driver not work -help

ソリューションへジャンプ
1,815件の閲覧回数
piyushashtikar
Contributor II
We are working on custom iMX6Q board and have interfaced 4 x 4 Matrix keyboard.

I am using fsl-community-bsp daisy branch.

I tested if hardware is correct by making all pins gpio, it works well.
Now, I need to use kpp driver, which does not work.
My device tree entry looks like this
///////////////////////////////////////////////////////////////////////////////////
    &kpp{
        compatible = "fsl,imx6q-kpp", "fsl,imx21-kpp";
        reg = <0x020b8000 0x4000>;
        interrupts = <0 82 0x04>;
        clocks = <&clks 62>;
        pinctrl-0 = <&pinctrl_kpp_2>;
        linux,keymap = <
                0x01010032      /*  KEY_M*/
                0x01020014      /*  KEY_T */
                0x0100001F      /*  KEY_S */
                0x01050012      /*  KEY_E */
                >;
        keypad,num-rows = <4>;
        keypad,num-columns = <4>;
        };

    kpp {
        pinctrl_kpp_2: kpp_grp_2 {
            fsl,pins = <
                MX6QDL_PAD_KEY_ROW0__KEY_ROW0       0x1b010
                MX6QDL_PAD_KEY_ROW1__KEY_ROW1      0x1b010
                MX6QDL_PAD_KEY_ROW2__KEY_ROW2      0x1b0b0
                MX6QDL_PAD_KEY_ROW4__KEY_ROW4      0x1b0b0
               
                MX6QDL_PAD_KEY_COL0__KEY_COL0      0x1b0b0
                MX6QDL_PAD_KEY_COL1__KEY_COL1      0x1b0b0
                MX6QDL_PAD_KEY_COL2__KEY_COL2      0x1b0b0
                MX6QDL_PAD_GPIO_0__KEY_COL5      0x1b0b0
            >;
        };


    };

/////////////////////////////////////////////////////////////////////////////////////////////////////////
in file imx_keypad.c   
   dev_dbg(&pdev->dev, "enabled rows mask: %x\n", keypad->rows_en_mask);
    dev_dbg(&pdev->dev, "enabled cols mask: %x\n", keypad->cols_en_mask);

Messages print 0x17 and 0x27 which I guess is correct.

Now I tried putting message in function imx_keypad_check_for_events() and in imx_keypad_scan_matrix()
which does not print even once.

Here is my dmesg log.

///////////////////////////////////////////////////////                                                     
Nov 25 13:21:00 imx6qsabresd user.debug kernel: imx-keypad 20b8000.kpp: enabled rows mask: 17                                                                  
Nov 25 13:21:00 imx6qsabresd user.debug kernel: imx-keypad 20b8000.kpp: enabled cols mask: 27                                                                  
Nov 25 13:21:00 imx6qsabresd user.info kernel: input: 20b8000.kpp as /devices/soc0/soc.1/2000000.aips-bus/20b8000.kpp/input/input0
///////////////////////////////////////////////////////

I guess my setup_timer fails, any help is appreciated.

ラベル(4)
タグ(1)
1 解決策
1,228件の閲覧回数
piyushashtikar
Contributor II

Thanks igor,

MATRIX_KEY macro is not defined in the daisy branch.
My problem was that IOMUX implemented in .dtsi file is not reflected in registers.

I have exclusively write those registers using a bash script.
Regards,
Piyush Ashtikar.

元の投稿で解決策を見る

3 返答(返信)
1,229件の閲覧回数
piyushashtikar
Contributor II

Thanks igor,

MATRIX_KEY macro is not defined in the daisy branch.
My problem was that IOMUX implemented in .dtsi file is not reflected in registers.

I have exclusively write those registers using a bash script.
Regards,
Piyush Ashtikar.
1,228件の閲覧回数
abhijeet_ghodga
Contributor III

How to write these registers using bash script?

0 件の賞賛
返信
1,228件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi piyush

keypad is used on i.MX6SL EVK please check imx6sl-evk.dts
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/boot/dts/imx6sl-evk.dts?id...

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------