AnsweredAssumed Answered

keypad port driver in optee not working

Question asked by Asma Alekar on Jul 29, 2019
Latest reply on Aug 21, 2019 by Yuri Muhin

Hello Everyone,


I am writing keypad driver using imx6 keypad port in optee core . The idea is whenever key is pressed on keypad module interrupt will be generated in optee keypad driver and the value of key-pressed would be send to normal world from secure world.


I have added driver at @ /optee-os/core/drivers/keypad_driver.c

I have written keypad Pseudo TA  @ /optee-os/core/arch/arm/pta/pta_keypad.c

Please find both the attachments


I am calling pseudo TA from normal world and I am not getting any output.

I have defined KPP pin definition in device tree. my question is,

Is it right to do KPP definition in device tree if I am writing driver in Optee core,as I want to make it secure?

My device tree definition for ROW 0,1,3 and COL 0,1,2,3:


pinctrl_kpp: kppgrp {
            fsl,pins = <
                MX6UL_PAD_ENET1_RX_DATA0__KPP_ROW00        0x1B010
                MX6UL_PAD_ENET1_RX_EN__KPP_ROW01        0x1B010
                MX6UL_PAD_ENET1_TX_CLK__KPP_ROW03       0x1B010
                MX6UL_PAD_ENET1_RX_DATA1__KPP_COL00        0x110B0
                MX6UL_PAD_ENET1_TX_DATA0__KPP_COL01     0x110B0
                MX6UL_PAD_ENET1_TX_EN__KPP_COL02        0x110B0
                MX6UL_PAD_ENET1_RX_ER__KPP_COL03        0x110B0


&kpp {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_kpp>;
    status = "okay";


Is the above declaration correct?

I have removed compatible field, as I want to use my own driver from Optee core, Is it OK to remove?


One more question is, Do I have to enable clock in my optee keypad driver?


Can somebody please have a look at driver and PTA.


Thanks & Regards,