atmel-adc.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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-num-channels: Number of channels available in the ADC
  10. - atmel,adc-startup-time: Startup Time of the ADC in microseconds as
  11. defined in the datasheet
  12. - atmel,adc-vref: Reference voltage in millivolts for the conversions
  13. - atmel,adc-res: List of resolution in bits supported by the ADC. List size
  14. must be two at least.
  15. - atmel,adc-res-names: Contains one identifier string for each resolution
  16. in atmel,adc-res property. "lowres" and "highres"
  17. identifiers are required.
  18. Optional properties:
  19. - atmel,adc-use-external: Boolean to enable of external triggers
  20. - atmel,adc-use-res: String corresponding to an identifier from
  21. atmel,adc-res-names property. If not specified, the highest
  22. resolution will be used.
  23. - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion
  24. - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds
  25. Optional trigger Nodes:
  26. - Required properties:
  27. * trigger-name: Name of the trigger exposed to the user
  28. * trigger-value: Value to put in the Trigger register
  29. to activate this trigger
  30. - Optional properties:
  31. * trigger-external: Is the trigger an external trigger?
  32. Examples:
  33. adc0: adc@fffb0000 {
  34. compatible = "atmel,at91sam9260-adc";
  35. reg = <0xfffb0000 0x100>;
  36. interrupts = <20 4>;
  37. atmel,adc-channel-base = <0x30>;
  38. atmel,adc-channels-used = <0xff>;
  39. atmel,adc-drdy-mask = <0x10000>;
  40. atmel,adc-num-channels = <8>;
  41. atmel,adc-startup-time = <40>;
  42. atmel,adc-status-register = <0x1c>;
  43. atmel,adc-trigger-register = <0x08>;
  44. atmel,adc-use-external;
  45. atmel,adc-vref = <3300>;
  46. atmel,adc-res = <8 10>;
  47. atmel,adc-res-names = "lowres", "highres";
  48. atmel,adc-use-res = "lowres";
  49. trigger@0 {
  50. trigger-name = "external-rising";
  51. trigger-value = <0x1>;
  52. trigger-external;
  53. };
  54. trigger@1 {
  55. trigger-name = "external-falling";
  56. trigger-value = <0x2>;
  57. trigger-external;
  58. };
  59. trigger@2 {
  60. trigger-name = "external-any";
  61. trigger-value = <0x3>;
  62. trigger-external;
  63. };
  64. trigger@3 {
  65. trigger-name = "continuous";
  66. trigger-value = <0x6>;
  67. };
  68. };