cyttsp.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. * Cypress cyttsp touchscreen controller
  2. Required properties:
  3. - compatible : must be "cypress,cyttsp-i2c" or "cypress,cyttsp-spi"
  4. - reg : Device I2C address or SPI chip select number
  5. - spi-max-frequency : Maximum SPI clocking speed of the device (for cyttsp-spi)
  6. - interrupts : (gpio) interrupt to which the chip is connected
  7. (see interrupt binding[0]).
  8. - bootloader-key : the 8-byte bootloader key that is required to switch
  9. the chip from bootloader mode (default mode) to
  10. application mode.
  11. This property has to be specified as an array of 8
  12. '/bits/ 8' values.
  13. Optional properties:
  14. - reset-gpios : the reset gpio the chip is connected to
  15. (see GPIO binding[1] for more details).
  16. - touchscreen-size-x : horizontal resolution of touchscreen (in pixels)
  17. - touchscreen-size-y : vertical resolution of touchscreen (in pixels)
  18. - touchscreen-fuzz-x : horizontal noise value of the absolute input device
  19. (in pixels)
  20. - touchscreen-fuzz-y : vertical noise value of the absolute input device
  21. (in pixels)
  22. - active-distance : the distance in pixels beyond which a touch must move
  23. before movement is detected and reported by the device.
  24. Valid values: 0-15.
  25. - active-interval-ms : the minimum period in ms between consecutive
  26. scanning/processing cycles when the chip is in active mode.
  27. Valid values: 0-255.
  28. - lowpower-interval-ms : the minimum period in ms between consecutive
  29. scanning/processing cycles when the chip is in low-power mode.
  30. Valid values: 0-2550
  31. - touch-timeout-ms : minimum time in ms spent in the active power state while no
  32. touches are detected before entering low-power mode.
  33. Valid values: 0-2550
  34. - use-handshake : enable register-based handshake (boolean). This should
  35. only be used if the chip is configured to use 'blocking
  36. communication with timeout' (in this case the device
  37. generates an interrupt at the end of every
  38. scanning/processing cycle).
  39. [0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
  40. [1]: Documentation/devicetree/bindings/gpio/gpio.txt
  41. Example:
  42. &i2c1 {
  43. /* ... */
  44. cyttsp@a {
  45. compatible = "cypress,cyttsp-i2c";
  46. reg = <0xa>;
  47. interrupt-parent = <&gpio0>;
  48. interrupts = <28 0>;
  49. reset-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
  50. touchscreen-size-x = <800>;
  51. touchscreen-size-y = <480>;
  52. touchscreen-fuzz-x = <4>;
  53. touchscreen-fuzz-y = <7>;
  54. bootloader-key = /bits/ 8 <0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08>;
  55. active-distance = <8>;
  56. active-interval-ms = <0>;
  57. lowpower-interval-ms = <200>;
  58. touch-timeout-ms = <100>;
  59. };
  60. /* ... */
  61. };
  62. &mcspi1 {
  63. /* ... */
  64. cyttsp@0 {
  65. compatible = "cypress,cyttsp-spi";
  66. spi-max-frequency = <6000000>;
  67. reg = <0>;
  68. interrupt-parent = <&gpio0>;
  69. interrupts = <28 0>;
  70. reset-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
  71. touchscreen-size-x = <800>;
  72. touchscreen-size-y = <480>;
  73. touchscreen-fuzz-x = <4>;
  74. touchscreen-fuzz-y = <7>;
  75. bootloader-key = /bits/ 8 <0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08>;
  76. active-distance = <8>;
  77. active-interval-ms = <0>;
  78. lowpower-interval-ms = <200>;
  79. touch-timeout-ms = <100>;
  80. };
  81. /* ... */
  82. };