ti-tsc-adc.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. * TI - TSC ADC (Touschscreen and analog digital converter)
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. Required properties:
  4. - child "tsc"
  5. ti,wires: Wires refer to application modes i.e. 4/5/8 wire touchscreen
  6. support on the platform.
  7. ti,x-plate-resistance: X plate resistance
  8. ti,coordinate-readouts: The sequencer supports a total of 16
  9. programmable steps each step is used to
  10. read a single coordinate. A single
  11. readout is enough but multiple reads can
  12. increase the quality.
  13. A value of 5 means, 5 reads for X, 5 for
  14. Y and 2 for Z (always). This utilises 12
  15. of the 16 software steps available. The
  16. remaining 4 can be used by the ADC.
  17. ti,wire-config: Different boards could have a different order for
  18. connecting wires on touchscreen. We need to provide an
  19. 8 bit number where in the 1st four bits represent the
  20. analog lines and the next 4 bits represent positive/
  21. negative terminal on that input line. Notations to
  22. represent the input lines and terminals resoectively
  23. is as follows:
  24. AIN0 = 0, AIN1 = 1 and so on till AIN7 = 7.
  25. XP = 0, XN = 1, YP = 2, YN = 3.
  26. - child "adc"
  27. ti,adc-channels: List of analog inputs available for ADC.
  28. AIN0 = 0, AIN1 = 1 and so on till AIN7 = 7.
  29. Optional properties:
  30. - child "tsc"
  31. ti,charge-delay: Length of touch screen charge delay step in terms of
  32. ADC clock cycles. Charge delay value should be large
  33. in order to avoid false pen-up events. This value
  34. effects the overall sampling speed, hence need to be
  35. kept as low as possible, while avoiding false pen-up
  36. event. Start from a lower value, say 0x400, and
  37. increase value until false pen-up events are avoided.
  38. The pen-up detection happens immediately after the
  39. charge step, so this does in fact function as a
  40. hardware knob for adjusting the amount of "settling
  41. time".
  42. - child "adc"
  43. ti,chan-step-opendelay: List of open delays for each channel of
  44. ADC in the order of ti,adc-channels. The
  45. value corresponds to the number of ADC
  46. clock cycles to wait after applying the
  47. step configuration registers and before
  48. sending the start of ADC conversion.
  49. Maximum value is 0x3FFFF.
  50. ti,chan-step-sampledelay: List of sample delays for each channel
  51. of ADC in the order of ti,adc-channels.
  52. The value corresponds to the number of
  53. ADC clock cycles to sample (to hold
  54. start of conversion high).
  55. Maximum value is 0xFF.
  56. ti,chan-step-avg: Number of averages to be performed for each
  57. channel of ADC. If average is 16 then input
  58. is sampled 16 times and averaged to get more
  59. accurate value. This increases the time taken
  60. by ADC to generate a sample. Valid range is 0
  61. average to 16 averages. Maximum value is 16.
  62. Example:
  63. tscadc: tscadc@44e0d000 {
  64. compatible = "ti,am3359-tscadc";
  65. tsc {
  66. ti,wires = <4>;
  67. ti,x-plate-resistance = <200>;
  68. ti,coordiante-readouts = <5>;
  69. ti,wire-config = <0x00 0x11 0x22 0x33>;
  70. ti,charge-delay = <0x400>;
  71. };
  72. adc {
  73. ti,adc-channels = <4 5 6 7>;
  74. ti,chan-step-opendelay = <0x098 0x3ffff 0x098 0x0>;
  75. ti,chan-step-sampledelay = <0xff 0x0 0xf 0x0>;
  76. ti,chan-step-avg = <16 2 4 8>;
  77. };
  78. }