atmel-adc.txt 2.6 KB

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