iMX6 - Device Tree configuration for ADP5588 keypad contorller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6 - Device Tree configuration for ADP5588 keypad contorller

2,544 Views
dhanyahc
Contributor II

Hello

Not sure this is the right form to ask this question.

I wanted to add device tree node to support ADP5588 keypad controller which uses I2C1 bus to communicate with iMX6 processor and an external interrupt pin (GPIO)

I browsed though /Documentation/devicetree/bindings/input, but could not find any documentation related to ADP5588 keypad controller. How can I figure out device tree is supported for ADP5588 or not? If yes then where can I get node structure information.

Labels (2)
Tags (3)
0 Kudos
Reply
2 Replies

1,837 Views
dhanyahc
Contributor II

I didn’t find any information about configuring ADP5588 in device tree. I think device tree binding is not supported for ADP5588. (I could be wrong)

I found an alternative way to configure ADP5588.

TCA8418 keypad controller from TI is register compatible with ADP5588, hence we can use TCA8418 driver to communicate with ADP5588. Device tree binding is supported for TCA8418.

Note: ADP5588 supports additional features like light sensor which will not work with TCA8418

Here is simple device tree configuration structure.

For more information, you may visit http://dev.pyra-handheld.com/index.php/p/pyra-kernel/source/tree/e20a43f968367b66aa297b780729d19bf77...

i2c_kyepad: tca8418@34 {

                                pinctrl-names = "default";

                                pinctrl-0 = <&pinctrl_keypad_int>;

                                compatible = "ti,tca8418";

                                reg = <0x34>;

                                interrupt-parent = <&gpio6>;

                                interrupts = <17 4>;

                                keypad,num-rows = <8>;

                                keypad,num-columns = <10>;

                                linux,keymap = <

                                0x0306003b

                                0x0203003c

                                0x02040057

                                0x01080058

                                …………………

                                …………………

                                …………………

                                …………………

                                0x0200001d

                                0x01000001

                                0x00010036

                                0x0101004e

                                0x03010061

                                0x0201004a

                                0x07000110

                                0x06000111

                                >;

                                status = "okay";

0 Kudos
Reply

1,837 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi,

In case that you need to add custom hardware support modifying the Device Tree, you could use as reference the following document:

Basic Device Tree for the Udoo Board

Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------