blob: fd2d69ee2876bd958ccd88748d8717cf9fd8eb6b [file] [log] [blame]
Maxime Riparde3641852012-05-11 15:35:37 +02001* AT91's Analog to Digital Converter (ADC)
2
3Required properties:
4 - compatible: Should be "atmel,at91sam9260-adc"
5 - reg: Should contain ADC registers location and length
6 - interrupts: Should contain the IRQ line for the ADC
7 - atmel,adc-channel-base: Offset of the first channel data register
8 - atmel,adc-channels-used: Bitmask of the channels muxed and enable for this
9 device
10 - atmel,adc-drdy-mask: Mask of the DRDY interruption in the ADC
11 - atmel,adc-num-channels: Number of channels available in the ADC
12 - atmel,adc-startup-time: Startup Time of the ADC in microseconds as
13 defined in the datasheet
14 - atmel,adc-status-register: Offset of the Interrupt Status Register
15 - atmel,adc-trigger-register: Offset of the Trigger Register
16 - atmel,adc-vref: Reference voltage in millivolts for the conversions
Ludovic Desroches47be16b2013-03-29 14:54:00 +000017 - atmel,adc-res: List of resolution in bits supported by the ADC. List size
18 must be two at least.
19 - atmel,adc-res-names: Contains one identifier string for each resolution
20 in atmel,adc-res property. "lowres" and "highres"
21 identifiers are required.
Maxime Riparde3641852012-05-11 15:35:37 +020022
23Optional properties:
24 - atmel,adc-use-external: Boolean to enable of external triggers
Ludovic Desroches47be16b2013-03-29 14:54:00 +000025 - atmel,adc-use-res: String corresponding to an identifier from
26 atmel,adc-res-names property. If not specified, the highest
27 resolution will be used.
Maxime Riparde3641852012-05-11 15:35:37 +020028
29Optional trigger Nodes:
30 - Required properties:
31 * trigger-name: Name of the trigger exposed to the user
32 * trigger-value: Value to put in the Trigger register
33 to activate this trigger
34 - Optional properties:
35 * trigger-external: Is the trigger an external trigger?
36
37Examples:
38adc0: adc@fffb0000 {
39 compatible = "atmel,at91sam9260-adc";
40 reg = <0xfffb0000 0x100>;
41 interrupts = <20 4>;
42 atmel,adc-channel-base = <0x30>;
43 atmel,adc-channels-used = <0xff>;
44 atmel,adc-drdy-mask = <0x10000>;
45 atmel,adc-num-channels = <8>;
46 atmel,adc-startup-time = <40>;
47 atmel,adc-status-register = <0x1c>;
48 atmel,adc-trigger-register = <0x08>;
49 atmel,adc-use-external;
50 atmel,adc-vref = <3300>;
Ludovic Desroches47be16b2013-03-29 14:54:00 +000051 atmel,adc-res = <8 10>;
52 atmel,adc-res-names = "lowres", "highres";
53 atmel,adc-use-res = "lowres";
Maxime Riparde3641852012-05-11 15:35:37 +020054
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
66 trigger@2 {
67 trigger-name = "external-any";
68 trigger-value = <0x3>;
69 trigger-external;
70 };
71
72 trigger@3 {
73 trigger-name = "continuous";
74 trigger-value = <0x6>;
75 };
76};