Maxime Ripard | e364185 | 2012-05-11 15:35:37 +0200 | [diff] [blame] | 1 | * AT91's Analog to Digital Converter (ADC) |
| 2 | |
| 3 | Required 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 |
| 17 | |
| 18 | Optional properties: |
| 19 | - atmel,adc-use-external: Boolean to enable of external triggers |
| 20 | |
| 21 | Optional trigger Nodes: |
| 22 | - Required properties: |
| 23 | * trigger-name: Name of the trigger exposed to the user |
| 24 | * trigger-value: Value to put in the Trigger register |
| 25 | to activate this trigger |
| 26 | - Optional properties: |
| 27 | * trigger-external: Is the trigger an external trigger? |
| 28 | |
| 29 | Examples: |
| 30 | adc0: adc@fffb0000 { |
| 31 | compatible = "atmel,at91sam9260-adc"; |
| 32 | reg = <0xfffb0000 0x100>; |
| 33 | interrupts = <20 4>; |
| 34 | atmel,adc-channel-base = <0x30>; |
| 35 | atmel,adc-channels-used = <0xff>; |
| 36 | atmel,adc-drdy-mask = <0x10000>; |
| 37 | atmel,adc-num-channels = <8>; |
| 38 | atmel,adc-startup-time = <40>; |
| 39 | atmel,adc-status-register = <0x1c>; |
| 40 | atmel,adc-trigger-register = <0x08>; |
| 41 | atmel,adc-use-external; |
| 42 | atmel,adc-vref = <3300>; |
| 43 | |
| 44 | trigger@0 { |
| 45 | trigger-name = "external-rising"; |
| 46 | trigger-value = <0x1>; |
| 47 | trigger-external; |
| 48 | }; |
| 49 | trigger@1 { |
| 50 | trigger-name = "external-falling"; |
| 51 | trigger-value = <0x2>; |
| 52 | trigger-external; |
| 53 | }; |
| 54 | |
| 55 | trigger@2 { |
| 56 | trigger-name = "external-any"; |
| 57 | trigger-value = <0x3>; |
| 58 | trigger-external; |
| 59 | }; |
| 60 | |
| 61 | trigger@3 { |
| 62 | trigger-name = "continuous"; |
| 63 | trigger-value = <0x6>; |
| 64 | }; |
| 65 | }; |