fsl,mpr121-touchkey.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/input/fsl,mpr121-touchkey.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Freescale MPR121 capacitive touch sensor controller
  7. maintainers:
  8. - Dmitry Torokhov <dmitry.torokhov@gmail.com>
  9. description: |
  10. The MPR121 supports up to 12 completely independent electrodes/capacitance
  11. sensing inputs in which 8 are multifunctional for LED driving and GPIO.
  12. https://www.nxp.com/docs/en/data-sheet/MPR121.pdf
  13. allOf:
  14. - $ref: input.yaml#
  15. anyOf:
  16. - required: [ interrupts ]
  17. - required: [ poll-interval ]
  18. properties:
  19. compatible:
  20. const: fsl,mpr121-touchkey
  21. reg:
  22. maxItems: 1
  23. interrupts:
  24. maxItems: 1
  25. vdd-supply: true
  26. linux,keycodes:
  27. minItems: 1
  28. maxItems: 12
  29. wakeup-source:
  30. description: Use any event on keypad as wakeup event.
  31. type: boolean
  32. required:
  33. - compatible
  34. - reg
  35. - vdd-supply
  36. - linux,keycodes
  37. unevaluatedProperties: false
  38. examples:
  39. - |
  40. // Example with interrupts
  41. #include "dt-bindings/input/input.h"
  42. i2c {
  43. #address-cells = <1>;
  44. #size-cells = <0>;
  45. touchkey@5a {
  46. compatible = "fsl,mpr121-touchkey";
  47. reg = <0x5a>;
  48. interrupt-parent = <&gpio1>;
  49. interrupts = <28 2>;
  50. autorepeat;
  51. vdd-supply = <&ldo4_reg>;
  52. linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,
  53. <KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,
  54. <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
  55. };
  56. };
  57. - |
  58. // Example with polling
  59. #include "dt-bindings/input/input.h"
  60. i2c {
  61. #address-cells = <1>;
  62. #size-cells = <0>;
  63. touchkey@5a {
  64. compatible = "fsl,mpr121-touchkey";
  65. reg = <0x5a>;
  66. poll-interval = <20>;
  67. autorepeat;
  68. vdd-supply = <&ldo4_reg>;
  69. linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,
  70. <KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,
  71. <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
  72. };
  73. };