atmel-adc.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. * AT91's Analog to Digital Converter (ADC)
  2. Required properties:
  3. - compatible: Should be "atmel,<chip>-adc"
  4. <chip> can be "at91sam9260", "at91sam9g45" or "at91sam9x5"
  5. - reg: Should contain ADC registers location and length
  6. - interrupts: Should contain the IRQ line for the ADC
  7. - atmel,adc-channels-used: Bitmask of the channels muxed and enable for this
  8. device
  9. - atmel,adc-startup-time: Startup Time of the ADC in microseconds as
  10. defined in the datasheet
  11. - atmel,adc-vref: Reference voltage in millivolts for the conversions
  12. - atmel,adc-res: List of resolution in bits supported by the ADC. List size
  13. must be two at least.
  14. - atmel,adc-res-names: Contains one identifier string for each resolution
  15. in atmel,adc-res property. "lowres" and "highres"
  16. identifiers are required.
  17. Optional properties:
  18. - atmel,adc-use-external: Boolean to enable of external triggers
  19. - atmel,adc-use-res: String corresponding to an identifier from
  20. atmel,adc-res-names property. If not specified, the highest
  21. resolution will be used.
  22. - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion
  23. - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds
  24. - atmel,adc-ts-wires: Number of touch screen wires. Should be 4 or 5. If this
  25. value is set, then adc driver will enable touch screen
  26. support.
  27. NOTE: when adc touch screen enabled, the adc hardware trigger will be
  28. disabled. Since touch screen will occupied the trigger register.
  29. - atmel,adc-ts-pressure-threshold: a pressure threshold for touchscreen. It
  30. make touch detect more precision.
  31. Optional trigger Nodes:
  32. - Required properties:
  33. * trigger-name: Name of the trigger exposed to the user
  34. * trigger-value: Value to put in the Trigger register
  35. to activate this trigger
  36. - Optional properties:
  37. * trigger-external: Is the trigger an external trigger?
  38. Examples:
  39. adc0: adc@fffb0000 {
  40. compatible = "atmel,at91sam9260-adc";
  41. reg = <0xfffb0000 0x100>;
  42. interrupts = <20 4>;
  43. atmel,adc-channel-base = <0x30>;
  44. atmel,adc-channels-used = <0xff>;
  45. atmel,adc-drdy-mask = <0x10000>;
  46. atmel,adc-num-channels = <8>;
  47. atmel,adc-startup-time = <40>;
  48. atmel,adc-status-register = <0x1c>;
  49. atmel,adc-trigger-register = <0x08>;
  50. atmel,adc-use-external;
  51. atmel,adc-vref = <3300>;
  52. atmel,adc-res = <8 10>;
  53. atmel,adc-res-names = "lowres", "highres";
  54. atmel,adc-use-res = "lowres";
  55. trigger@0 {
  56. trigger-name = "external-rising";
  57. trigger-value = <0x1>;
  58. trigger-external;
  59. };
  60. trigger@1 {
  61. trigger-name = "external-falling";
  62. trigger-value = <0x2>;
  63. trigger-external;
  64. };
  65. trigger@2 {
  66. trigger-name = "external-any";
  67. trigger-value = <0x3>;
  68. trigger-external;
  69. };
  70. trigger@3 {
  71. trigger-name = "continuous";
  72. trigger-value = <0x6>;
  73. };
  74. };