mediatek,mt6779-keypad.yaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/input/mediatek,mt6779-keypad.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Mediatek's Keypad Controller
  7. maintainers:
  8. - Mattijs Korpershoek <mkorpershoek@baylibre.com>
  9. allOf:
  10. - $ref: /schemas/input/matrix-keymap.yaml#
  11. description: |
  12. Mediatek's Keypad controller is used to interface a SoC with a matrix-type
  13. keypad device. The keypad controller supports multiple row and column lines.
  14. A key can be placed at each intersection of a unique row and a unique column.
  15. The keypad controller can sense a key-press and key-release and report the
  16. event using a interrupt to the cpu.
  17. properties:
  18. compatible:
  19. oneOf:
  20. - const: mediatek,mt6779-keypad
  21. - items:
  22. - enum:
  23. - mediatek,mt6873-keypad
  24. - const: mediatek,mt6779-keypad
  25. reg:
  26. maxItems: 1
  27. interrupts:
  28. maxItems: 1
  29. clocks:
  30. maxItems: 1
  31. clock-names:
  32. items:
  33. - const: kpd
  34. wakeup-source:
  35. description: use any event on keypad as wakeup event
  36. type: boolean
  37. debounce-delay-ms:
  38. maximum: 256
  39. default: 16
  40. mediatek,keys-per-group:
  41. description: each (row, column) group has multiple keys
  42. $ref: /schemas/types.yaml#/definitions/uint32
  43. default: 1
  44. maximum: 2
  45. required:
  46. - compatible
  47. - reg
  48. - interrupts
  49. - clocks
  50. - clock-names
  51. unevaluatedProperties: false
  52. examples:
  53. - |
  54. #include <dt-bindings/input/input.h>
  55. #include <dt-bindings/interrupt-controller/arm-gic.h>
  56. soc {
  57. #address-cells = <2>;
  58. #size-cells = <2>;
  59. keyboard@10010000 {
  60. compatible = "mediatek,mt6779-keypad";
  61. reg = <0 0x10010000 0 0x1000>;
  62. interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>;
  63. clocks = <&clk26m>;
  64. clock-names = "kpd";
  65. };
  66. };