toradex,vf50-touchscreen.yaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/input/touchscreen/toradex,vf50-touchscreen.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Toradex Colibri VF50 Touchscreen
  7. maintainers:
  8. - Dmitry Torokhov <dmitry.torokhov@gmail.com>
  9. - Sanchayan Maity <maitysanchayan@gmail.com>
  10. properties:
  11. compatible:
  12. const: toradex,vf50-touchscreen
  13. interrupts:
  14. maxItems: 1
  15. io-channels:
  16. maxItems: 4
  17. description:
  18. adc channels being used by the Colibri VF50 module
  19. IIO ADC for Y-, X-, Y+, X+ connections
  20. xp-gpios:
  21. description: FET gate driver for input of X+
  22. xm-gpios:
  23. description: FET gate driver for input of X-
  24. yp-gpios:
  25. description: FET gate driver for input of Y+
  26. ym-gpios:
  27. description: FET gate driver for input of Y-
  28. vf50-ts-min-pressure:
  29. $ref: /schemas/types.yaml#/definitions/uint32
  30. minimum: 50
  31. maximum: 2000
  32. description: pressure level at which to stop measuring X/Y values
  33. required:
  34. - compatible
  35. - io-channels
  36. - xp-gpios
  37. - xm-gpios
  38. - yp-gpios
  39. - ym-gpios
  40. - interrupts
  41. - vf50-ts-min-pressure
  42. allOf:
  43. - $ref: touchscreen.yaml#
  44. unevaluatedProperties: false
  45. examples:
  46. - |
  47. #include <dt-bindings/interrupt-controller/irq.h>
  48. #include <dt-bindings/gpio/gpio.h>
  49. touchscreen {
  50. compatible = "toradex,vf50-touchscreen";
  51. interrupt-parent = <&gpio0>;
  52. interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
  53. io-channels = <&adc1 0>, <&adc0 0>, <&adc0 1>, <&adc1 2>;
  54. xp-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  55. xm-gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>;
  56. yp-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  57. ym-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
  58. pinctrl-names = "idle", "default";
  59. pinctrl-0 = <&pinctrl_touchctrl_idle>, <&pinctrl_touchctrl_gpios>;
  60. pinctrl-1 = <&pinctrl_touchctrl_default>, <&pinctrl_touchctrl_gpios>;
  61. vf50-ts-min-pressure = <200>;
  62. };