samsung-keypad.txt 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 specific to linux:
  31. - linux,keypad-no-autorepeat: do no enable autorepeat feature.
  32. - linux,keypad-wakeup: use any event on keypad as wakeup event.
  33. Example:
  34. keypad@100A0000 {
  35. compatible = "samsung,s5pv210-keypad";
  36. reg = <0x100A0000 0x100>;
  37. interrupts = <173>;
  38. samsung,keypad-num-rows = <2>;
  39. samsung,keypad-num-columns = <8>;
  40. linux,input-no-autorepeat;
  41. linux,input-wakeup;
  42. pinctrl-names = "default";
  43. pinctrl-0 = <&keypad_rows &keypad_columns>;
  44. key_1 {
  45. keypad,row = <0>;
  46. keypad,column = <3>;
  47. linux,code = <2>;
  48. };
  49. key_2 {
  50. keypad,row = <0>;
  51. keypad,column = <4>;
  52. linux,code = <3>;
  53. };
  54. key_3 {
  55. keypad,row = <0>;
  56. keypad,column = <5>;
  57. linux,code = <4>;
  58. };
  59. };