ti,tsc2005.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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/ti,tsc2005.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Texas Instruments TSC2004 and TSC2005 touchscreen controller
  7. maintainers:
  8. - Marek Vasut <marex@denx.de>
  9. - Michael Welling <mwelling@ieee.org>
  10. properties:
  11. $nodename:
  12. pattern: "^touchscreen(@.*)?$"
  13. compatible:
  14. enum:
  15. - ti,tsc2004
  16. - ti,tsc2005
  17. reg:
  18. maxItems: 1
  19. description: |
  20. I2C address when used on the I2C bus, or the SPI chip select index
  21. when used on the SPI bus
  22. interrupts:
  23. maxItems: 1
  24. reset-gpios:
  25. maxItems: 1
  26. description: GPIO specifier for the controller reset line
  27. spi-max-frequency:
  28. description: TSC2005 SPI bus clock frequency.
  29. maximum: 25000000
  30. ti,x-plate-ohms:
  31. description: resistance of the touchscreen's X plates in ohm (defaults to 280)
  32. ti,esd-recovery-timeout-ms:
  33. description: |
  34. if the touchscreen does not respond after the configured time
  35. (in milli seconds), the driver will reset it. This is disabled
  36. by default.
  37. vio-supply:
  38. description: Regulator specifier
  39. touchscreen-fuzz-pressure: true
  40. touchscreen-fuzz-x: true
  41. touchscreen-fuzz-y: true
  42. touchscreen-max-pressure: true
  43. touchscreen-size-x: true
  44. touchscreen-size-y: true
  45. allOf:
  46. - $ref: touchscreen.yaml#
  47. - if:
  48. properties:
  49. compatible:
  50. contains:
  51. const: ti,tsc2004
  52. then:
  53. properties:
  54. spi-max-frequency: false
  55. additionalProperties: false
  56. required:
  57. - compatible
  58. - reg
  59. - interrupts
  60. examples:
  61. - |
  62. #include <dt-bindings/interrupt-controller/irq.h>
  63. #include <dt-bindings/gpio/gpio.h>
  64. i2c {
  65. #address-cells = <1>;
  66. #size-cells = <0>;
  67. touchscreen@48 {
  68. compatible = "ti,tsc2004";
  69. reg = <0x48>;
  70. vio-supply = <&vio>;
  71. reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>;
  72. interrupts-extended = <&gpio1 27 IRQ_TYPE_EDGE_RISING>;
  73. touchscreen-fuzz-x = <4>;
  74. touchscreen-fuzz-y = <7>;
  75. touchscreen-fuzz-pressure = <2>;
  76. touchscreen-size-x = <4096>;
  77. touchscreen-size-y = <4096>;
  78. touchscreen-max-pressure = <2048>;
  79. ti,x-plate-ohms = <280>;
  80. ti,esd-recovery-timeout-ms = <8000>;
  81. };
  82. };
  83. - |
  84. #include <dt-bindings/interrupt-controller/irq.h>
  85. #include <dt-bindings/gpio/gpio.h>
  86. spi {
  87. #address-cells = <1>;
  88. #size-cells = <0>;
  89. touchscreen@0 {
  90. compatible = "ti,tsc2005";
  91. spi-max-frequency = <6000000>;
  92. reg = <0>;
  93. vio-supply = <&vio>;
  94. reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* 104 */
  95. interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>; /* 100 */
  96. touchscreen-fuzz-x = <4>;
  97. touchscreen-fuzz-y = <7>;
  98. touchscreen-fuzz-pressure = <2>;
  99. touchscreen-size-x = <4096>;
  100. touchscreen-size-y = <4096>;
  101. touchscreen-max-pressure = <2048>;
  102. ti,x-plate-ohms = <280>;
  103. ti,esd-recovery-timeout-ms = <8000>;
  104. };
  105. };