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
Solved! Go to Solution.
Gentle reminder!!!
Could someone please help
Hello,
the issue is under discussion.
Regards,
Yuri.
Still under consideration, sorry.
~Yuri.
I was able to solve it on my own.
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.
Thank you Yuri,
I am not getting interrupt... Even though I have enabled inyerrupt.