atmel,maxtouch.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Atmel maXTouch touchscreen/touchpad
  7. maintainers:
  8. - Nick Dyer <nick@shmanahar.org>
  9. - Linus Walleij <linus.walleij@linaro.org>
  10. description: |
  11. Atmel maXTouch touchscreen or touchpads such as the mXT244
  12. and similar devices.
  13. allOf:
  14. - $ref: input.yaml#
  15. properties:
  16. compatible:
  17. const: atmel,maxtouch
  18. reg:
  19. maxItems: 1
  20. interrupts:
  21. maxItems: 1
  22. vdda-supply:
  23. description:
  24. Optional regulator for the AVDD analog voltage.
  25. vdd-supply:
  26. description:
  27. Optional regulator for the VDD digital voltage.
  28. reset-gpios:
  29. maxItems: 1
  30. description:
  31. Optional GPIO specifier for the touchscreen's reset pin
  32. (active low). The line must be flagged with
  33. GPIO_ACTIVE_LOW.
  34. wake-gpios:
  35. maxItems: 1
  36. description:
  37. Optional GPIO specifier for the touchscreen's wake pin
  38. (active low). The line must be flagged with
  39. GPIO_ACTIVE_LOW.
  40. linux,gpio-keymap:
  41. $ref: /schemas/types.yaml#/definitions/uint32-array
  42. description: |
  43. When enabled, the SPT_GPIOPWN_T19 object sends messages
  44. on GPIO bit changes. An array of up to 8 entries can be provided
  45. indicating the Linux keycode mapped to each bit of the status byte,
  46. starting at the LSB. Linux keycodes are defined in
  47. <dt-bindings/input/input.h>.
  48. Note: the numbering of the GPIOs and the bit they start at varies
  49. between maXTouch devices. You must either refer to the documentation,
  50. or experiment to determine which bit corresponds to which input. Use
  51. KEY_RESERVED for unused padding values.
  52. linux,keycodes:
  53. minItems: 1
  54. maxItems: 8
  55. atmel,wakeup-method:
  56. $ref: /schemas/types.yaml#/definitions/uint32
  57. description: |
  58. The WAKE line is an active-low input that is used to wake up the touch
  59. controller from deep-sleep mode before communication with the controller
  60. could be started. This optional feature used to minimize current
  61. consumption when the controller is in deep sleep mode. This feature is
  62. relevant only to some controller families, like mXT1386 controller for
  63. example.
  64. The WAKE pin can be connected in one of the following ways:
  65. 1) left permanently low
  66. 2) connected to the I2C-compatible SCL pin
  67. 3) connected to a GPIO pin on the host
  68. enum:
  69. - 0 # ATMEL_MXT_WAKEUP_NONE
  70. - 1 # ATMEL_MXT_WAKEUP_I2C_SCL
  71. - 2 # ATMEL_MXT_WAKEUP_GPIO
  72. default: 0
  73. wakeup-source:
  74. type: boolean
  75. required:
  76. - compatible
  77. - reg
  78. - interrupts
  79. additionalProperties: false
  80. examples:
  81. - |
  82. #include <dt-bindings/interrupt-controller/irq.h>
  83. #include <dt-bindings/input/atmel-maxtouch.h>
  84. #include <dt-bindings/gpio/gpio.h>
  85. i2c {
  86. #address-cells = <1>;
  87. #size-cells = <0>;
  88. touchscreen@4a {
  89. compatible = "atmel,maxtouch";
  90. reg = <0x4a>;
  91. interrupt-parent = <&gpio>;
  92. interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
  93. reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
  94. vdda-supply = <&ab8500_ldo_aux2_reg>;
  95. vdd-supply = <&ab8500_ldo_aux5_reg>;
  96. atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>;
  97. };
  98. };
  99. ...