-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IIO: AT91: Add DT support to at91_adc driver
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Loading branch information
Maxime Ripard
authored and
Greg Kroah-Hartman
committed
May 14, 2012
1 parent
5d449e4
commit e364185
Showing
2 changed files
with
196 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
* AT91's Analog to Digital Converter (ADC) | ||
|
||
Required properties: | ||
- compatible: Should be "atmel,at91sam9260-adc" | ||
- reg: Should contain ADC registers location and length | ||
- interrupts: Should contain the IRQ line for the ADC | ||
- atmel,adc-channel-base: Offset of the first channel data register | ||
- atmel,adc-channels-used: Bitmask of the channels muxed and enable for this | ||
device | ||
- atmel,adc-drdy-mask: Mask of the DRDY interruption in the ADC | ||
- atmel,adc-num-channels: Number of channels available in the ADC | ||
- atmel,adc-startup-time: Startup Time of the ADC in microseconds as | ||
defined in the datasheet | ||
- atmel,adc-status-register: Offset of the Interrupt Status Register | ||
- atmel,adc-trigger-register: Offset of the Trigger Register | ||
- atmel,adc-vref: Reference voltage in millivolts for the conversions | ||
|
||
Optional properties: | ||
- atmel,adc-use-external: Boolean to enable of external triggers | ||
|
||
Optional trigger Nodes: | ||
- Required properties: | ||
* trigger-name: Name of the trigger exposed to the user | ||
* trigger-value: Value to put in the Trigger register | ||
to activate this trigger | ||
- Optional properties: | ||
* trigger-external: Is the trigger an external trigger? | ||
|
||
Examples: | ||
adc0: adc@fffb0000 { | ||
compatible = "atmel,at91sam9260-adc"; | ||
reg = <0xfffb0000 0x100>; | ||
interrupts = <20 4>; | ||
atmel,adc-channel-base = <0x30>; | ||
atmel,adc-channels-used = <0xff>; | ||
atmel,adc-drdy-mask = <0x10000>; | ||
atmel,adc-num-channels = <8>; | ||
atmel,adc-startup-time = <40>; | ||
atmel,adc-status-register = <0x1c>; | ||
atmel,adc-trigger-register = <0x08>; | ||
atmel,adc-use-external; | ||
atmel,adc-vref = <3300>; | ||
|
||
trigger@0 { | ||
trigger-name = "external-rising"; | ||
trigger-value = <0x1>; | ||
trigger-external; | ||
}; | ||
trigger@1 { | ||
trigger-name = "external-falling"; | ||
trigger-value = <0x2>; | ||
trigger-external; | ||
}; | ||
|
||
trigger@2 { | ||
trigger-name = "external-any"; | ||
trigger-value = <0x3>; | ||
trigger-external; | ||
}; | ||
|
||
trigger@3 { | ||
trigger-name = "continuous"; | ||
trigger-value = <0x6>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters