blob: 3a05492acdafb5736862a6a43a100d17cd2cb5ab [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.
Jean-Christophe PLAGNIOL-VILLARDe7487832013-03-29 14:54:00 +000028 - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion
Maxime Riparde3641852012-05-11 15:35:37 +020029
30Optional trigger Nodes:
31 - Required properties:
32 * trigger-name: Name of the trigger exposed to the user
33 * trigger-value: Value to put in the Trigger register
34 to activate this trigger
35 - Optional properties:
36 * trigger-external: Is the trigger an external trigger?
37
38Examples:
39adc0: adc@fffb0000 {
40 compatible = "atmel,at91sam9260-adc";
41 reg = <0xfffb0000 0x100>;
42 interrupts = <20 4>;
43 atmel,adc-channel-base = <0x30>;
44 atmel,adc-channels-used = <0xff>;
45 atmel,adc-drdy-mask = <0x10000>;
46 atmel,adc-num-channels = <8>;
47 atmel,adc-startup-time = <40>;
48 atmel,adc-status-register = <0x1c>;
49 atmel,adc-trigger-register = <0x08>;
50 atmel,adc-use-external;
51 atmel,adc-vref = <3300>;
Ludovic Desroches47be16b2013-03-29 14:54:00 +000052 atmel,adc-res = <8 10>;
53 atmel,adc-res-names = "lowres", "highres";
54 atmel,adc-use-res = "lowres";
Maxime Riparde3641852012-05-11 15:35:37 +020055
56 trigger@0 {
57 trigger-name = "external-rising";
58 trigger-value = <0x1>;
59 trigger-external;
60 };
61 trigger@1 {
62 trigger-name = "external-falling";
63 trigger-value = <0x2>;
64 trigger-external;
65 };
66
67 trigger@2 {
68 trigger-name = "external-any";
69 trigger-value = <0x3>;
70 trigger-external;
71 };
72
73 trigger@3 {
74 trigger-name = "continuous";
75 trigger-value = <0x6>;
76 };
77};