keypad port driver in optee not working

cancel
Showing results for 
Search instead for 
Did you mean: 

keypad port driver in optee not working

Jump to solution
375 Views
Contributor IV

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:

imx6ul-14x14-evk.dts

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,

Asma

Labels (1)
Tags (2)
1 Solution
93 Views
Contributor IV

I was able to solve it on my own.

View solution in original post

7 Replies
93 Views
Contributor IV

Gentle reminder!!!

Could someone please help

0 Kudos
93 Views
NXP TechSupport
NXP TechSupport

Hello,

  the issue is under discussion.

Regards,

Yuri.

0 Kudos
93 Views
Contributor IV

YuriMuhin_ng‌,

Any update on this?

Regards,

Asma

0 Kudos
93 Views
NXP TechSupport
NXP TechSupport

Still under consideration, sorry.

~Yuri.

0 Kudos
94 Views
Contributor IV

I was able to solve it on my own.

View solution in original post

93 Views
NXP TechSupport
NXP TechSupport

Hello,

" It is Ok to modify the device tree as it fits for driver, as long as the node (kpp node) is not enabled for Linux to use.

When it comes to a clock, then yes it needs to be enabled on Optee side, but most importantly it must not be disabled on Linux side. Linux will disable any clock that is defined but not used."

Regards,

Yuri.

0 Kudos
93 Views
Contributor IV

Thank you Yuri,

I am not getting interrupt... Even though I have enabled inyerrupt.

0 Kudos