at91_adc.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. - clock-names: tuple listing input clock names.
  8. Required elements: "adc_clk", "adc_op_clk".
  9. - clocks: phandles to input clocks.
  10. - atmel,adc-channels-used: Bitmask of the channels muxed and enabled for this
  11. device
  12. - atmel,adc-startup-time: Startup Time of the ADC in microseconds as
  13. defined in the datasheet
  14. - atmel,adc-vref: Reference voltage in millivolts for the conversions
  15. - atmel,adc-res: List of resolutions in bits supported by the ADC. List size
  16. must be two at least.
  17. - atmel,adc-res-names: Contains one identifier string for each resolution
  18. in atmel,adc-res property. "lowres" and "highres"
  19. identifiers are required.
  20. Optional properties:
  21. - atmel,adc-use-external-triggers: Boolean to enable the external triggers
  22. - atmel,adc-use-res: String corresponding to an identifier from
  23. atmel,adc-res-names property. If not specified, the highest
  24. resolution will be used.
  25. - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion
  26. - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds
  27. - atmel,adc-ts-wires: Number of touchscreen wires. Should be 4 or 5. If this
  28. value is set, then the adc driver will enable touchscreen
  29. support.
  30. NOTE: when adc touchscreen is enabled, the adc hardware trigger will be
  31. disabled. Since touchscreen will occupy the trigger register.
  32. - atmel,adc-ts-pressure-threshold: a pressure threshold for touchscreen. It
  33. makes touch detection more precise.
  34. Optional trigger Nodes:
  35. - Required properties:
  36. * trigger-name: Name of the trigger exposed to the user
  37. * trigger-value: Value to put in the Trigger register
  38. to activate this trigger
  39. - Optional properties:
  40. * trigger-external: Is the trigger an external trigger?
  41. Examples:
  42. adc0: adc@fffb0000 {
  43. #address-cells = <1>;
  44. #size-cells = <0>;
  45. compatible = "atmel,at91sam9260-adc";
  46. reg = <0xfffb0000 0x100>;
  47. interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
  48. clocks = <&adc_clk>, <&adc_op_clk>;
  49. clock-names = "adc_clk", "adc_op_clk";
  50. atmel,adc-channels-used = <0xff>;
  51. atmel,adc-startup-time = <40>;
  52. atmel,adc-use-external-triggers;
  53. atmel,adc-vref = <3300>;
  54. atmel,adc-res = <8 10>;
  55. atmel,adc-res-names = "lowres", "highres";
  56. atmel,adc-use-res = "lowres";
  57. trigger0 {
  58. trigger-name = "external-rising";
  59. trigger-value = <0x1>;
  60. trigger-external;
  61. };
  62. trigger1 {
  63. trigger-name = "external-falling";
  64. trigger-value = <0x2>;
  65. trigger-external;
  66. };
  67. trigger2 {
  68. trigger-name = "external-any";
  69. trigger-value = <0x3>;
  70. trigger-external;
  71. };
  72. trigger3 {
  73. trigger-name = "continuous";
  74. trigger-value = <0x6>;
  75. };
  76. };