samsung-keypad.txt 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. * Samsung's Keypad Controller device tree bindings
  2. Samsung's Keypad controller is used to interface a SoC with a matrix-type
  3. keypad device. The keypad controller supports multiple row and column lines.
  4. A key can be placed at each intersection of a unique row and a unique column.
  5. The keypad controller can sense a key-press and key-release and report the
  6. event using a interrupt to the cpu.
  7. Required SoC Specific Properties:
  8. - compatible: should be one of the following
  9. - "samsung,s3c6410-keypad": For controllers compatible with s3c6410 keypad
  10. controller.
  11. - "samsung,s5pv210-keypad": For controllers compatible with s5pv210 keypad
  12. controller.
  13. - reg: physical base address of the controller and length of memory mapped
  14. region.
  15. - interrupts: The interrupt number to the cpu.
  16. Required Board Specific Properties:
  17. - samsung,keypad-num-rows: Number of row lines connected to the keypad
  18. controller.
  19. - samsung,keypad-num-columns: Number of column lines connected to the
  20. keypad controller.
  21. - Keys represented as child nodes: Each key connected to the keypad
  22. controller is represented as a child node to the keypad controller
  23. device node and should include the following properties.
  24. - keypad,row: the row number to which the key is connected.
  25. - keypad,column: the column number to which the key is connected.
  26. - linux,code: the key-code to be reported when the key is pressed
  27. and released.
  28. - pinctrl-0: Should specify pin control groups used for this controller.
  29. - pinctrl-names: Should contain only one value - "default".
  30. Optional Properties:
  31. - wakeup-source: use any event on keypad as wakeup event.
  32. (Legacy property supported: "linux,input-wakeup")
  33. Optional Properties specific to linux:
  34. - linux,keypad-no-autorepeat: do no enable autorepeat feature.
  35. Example:
  36. keypad@100A0000 {
  37. compatible = "samsung,s5pv210-keypad";
  38. reg = <0x100A0000 0x100>;
  39. interrupts = <173>;
  40. samsung,keypad-num-rows = <2>;
  41. samsung,keypad-num-columns = <8>;
  42. linux,input-no-autorepeat;
  43. wakeup-source;
  44. pinctrl-names = "default";
  45. pinctrl-0 = <&keypad_rows &keypad_columns>;
  46. key_1 {
  47. keypad,row = <0>;
  48. keypad,column = <3>;
  49. linux,code = <2>;
  50. };
  51. key_2 {
  52. keypad,row = <0>;
  53. keypad,column = <4>;
  54. linux,code = <3>;
  55. };
  56. key_3 {
  57. keypad,row = <0>;
  58. keypad,column = <5>;
  59. linux,code = <4>;
  60. };
  61. };