st-keyscan.txt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. * ST Keyscan controller Device Tree bindings
  2. The ST keyscan controller Device Tree binding is based on the
  3. matrix-keymap.
  4. Required properties:
  5. - compatible: "st,sti-keyscan"
  6. - reg: Register base address and size of st-keyscan controller.
  7. - interrupts: Interrupt number for the st-keyscan controller.
  8. - clocks: Must contain one entry, for the module clock.
  9. See ../clocks/clock-bindings.txt for details.
  10. - pinctrl: Should specify pin control groups used for this controller.
  11. See ../pinctrl/pinctrl-bindings.txt for details.
  12. - linux,keymap: The keymap for keys as described in the binding document
  13. devicetree/bindings/input/matrix-keymap.txt.
  14. - keypad,num-rows: Number of row lines connected to the keypad controller.
  15. - keypad,num-columns: Number of column lines connected to the keypad
  16. controller.
  17. Optional property:
  18. - st,debounce_us: Debouncing interval time in microseconds
  19. Example:
  20. keyscan: keyscan@fe4b0000 {
  21. compatible = "st,sti-keyscan";
  22. reg = <0xfe4b0000 0x2000>;
  23. interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
  24. clocks = <&CLK_SYSIN>;
  25. pinctrl-names = "default";
  26. pinctrl-0 = <&pinctrl_keyscan>;
  27. keypad,num-rows = <4>;
  28. keypad,num-columns = <4>;
  29. st,debounce_us = <5000>;
  30. linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_F13)
  31. MATRIX_KEY(0x00, 0x01, KEY_F9)
  32. MATRIX_KEY(0x00, 0x02, KEY_F5)
  33. MATRIX_KEY(0x00, 0x03, KEY_F1)
  34. MATRIX_KEY(0x01, 0x00, KEY_F14)
  35. MATRIX_KEY(0x01, 0x01, KEY_F10)
  36. MATRIX_KEY(0x01, 0x02, KEY_F6)
  37. MATRIX_KEY(0x01, 0x03, KEY_F2)
  38. MATRIX_KEY(0x02, 0x00, KEY_F15)
  39. MATRIX_KEY(0x02, 0x01, KEY_F11)
  40. MATRIX_KEY(0x02, 0x02, KEY_F7)
  41. MATRIX_KEY(0x02, 0x03, KEY_F3)
  42. MATRIX_KEY(0x03, 0x00, KEY_F16)
  43. MATRIX_KEY(0x03, 0x01, KEY_F12)
  44. MATRIX_KEY(0x03, 0x02, KEY_F8)
  45. MATRIX_KEY(0x03, 0x03, KEY_F4) >;
  46. };