at91_adc.txt 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. trigger@0 {
  58. reg = <0>;
  59. trigger-name = "external-rising";
  60. trigger-value = <0x1>;
  61. trigger-external;
  62. };
  63. trigger@1 {
  64. reg = <1>;
  65. trigger-name = "external-falling";
  66. trigger-value = <0x2>;
  67. trigger-external;
  68. };
  69. trigger@2 {
  70. reg = <2>;
  71. trigger-name = "external-any";
  72. trigger-value = <0x3>;
  73. trigger-external;
  74. };
  75. trigger@3 {
  76. reg = <3>;
  77. trigger-name = "continuous";
  78. trigger-value = <0x6>;
  79. };
  80. };