]> git.karo-electronics.de Git - karo-tx-linux.git/blob - Documentation/devicetree/bindings/arm/atmel-adc.txt
Linux 3.12-rc6
[karo-tx-linux.git] / Documentation / devicetree / bindings / arm / atmel-adc.txt
1 * AT91's Analog to Digital Converter (ADC)
2
3 Required properties:
4   - compatible: Should be "atmel,<chip>-adc"
5     <chip> can be "at91sam9260", "at91sam9g45" or "at91sam9x5"
6   - reg: Should contain ADC registers location and length
7   - interrupts: Should contain the IRQ line for the ADC
8   - atmel,adc-channels-used: Bitmask of the channels muxed and enable for this
9     device
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-vref: Reference voltage in millivolts for the conversions
14   - atmel,adc-res: List of resolution in bits supported by the ADC. List size
15                    must be two at least.
16   - atmel,adc-res-names: Contains one identifier string for each resolution
17                          in atmel,adc-res property. "lowres" and "highres"
18                          identifiers are required.
19
20 Optional properties:
21   - atmel,adc-use-external: Boolean to enable of 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  
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
36 Examples:
37 adc0: adc@fffb0000 {
38         compatible = "atmel,at91sam9260-adc";
39         reg = <0xfffb0000 0x100>;
40         interrupts = <20 4>;
41         atmel,adc-channel-base = <0x30>;
42         atmel,adc-channels-used = <0xff>;
43         atmel,adc-drdy-mask = <0x10000>;
44         atmel,adc-num-channels = <8>;
45         atmel,adc-startup-time = <40>;
46         atmel,adc-status-register = <0x1c>;
47         atmel,adc-trigger-register = <0x08>;
48         atmel,adc-use-external;
49         atmel,adc-vref = <3300>;
50         atmel,adc-res = <8 10>;
51         atmel,adc-res-names = "lowres", "highres";
52         atmel,adc-use-res = "lowres";
53
54         trigger@0 {
55                 trigger-name = "external-rising";
56                 trigger-value = <0x1>;
57                 trigger-external;
58         };
59         trigger@1 {
60                 trigger-name = "external-falling";
61                 trigger-value = <0x2>;
62                 trigger-external;
63         };
64
65         trigger@2 {
66                 trigger-name = "external-any";
67                 trigger-value = <0x3>;
68                 trigger-external;
69         };
70
71         trigger@3 {
72                 trigger-name = "continuous";
73                 trigger-value = <0x6>;
74         };
75 };