1*4882a593Smuzhiyun* AT91's Analog to Digital Converter (ADC) 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunRequired properties: 4*4882a593Smuzhiyun - compatible: Should be "atmel,<chip>-adc" 5*4882a593Smuzhiyun <chip> can be "at91sam9260", "at91sam9g45" or "at91sam9x5" 6*4882a593Smuzhiyun - reg: Should contain ADC registers location and length 7*4882a593Smuzhiyun - interrupts: Should contain the IRQ line for the ADC 8*4882a593Smuzhiyun - clock-names: tuple listing input clock names. 9*4882a593Smuzhiyun Required elements: "adc_clk", "adc_op_clk". 10*4882a593Smuzhiyun - clocks: phandles to input clocks. 11*4882a593Smuzhiyun - atmel,adc-channels-used: Bitmask of the channels muxed and enabled for this 12*4882a593Smuzhiyun device 13*4882a593Smuzhiyun - atmel,adc-startup-time: Startup Time of the ADC in microseconds as 14*4882a593Smuzhiyun defined in the datasheet 15*4882a593Smuzhiyun - atmel,adc-vref: Reference voltage in millivolts for the conversions 16*4882a593Smuzhiyun - atmel,adc-res: List of resolutions in bits supported by the ADC. List size 17*4882a593Smuzhiyun must be two at least. 18*4882a593Smuzhiyun - atmel,adc-res-names: Contains one identifier string for each resolution 19*4882a593Smuzhiyun in atmel,adc-res property. "lowres" and "highres" 20*4882a593Smuzhiyun identifiers are required. 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunOptional properties: 23*4882a593Smuzhiyun - atmel,adc-use-external-triggers: Boolean to enable the external triggers 24*4882a593Smuzhiyun - atmel,adc-use-res: String corresponding to an identifier from 25*4882a593Smuzhiyun atmel,adc-res-names property. If not specified, the highest 26*4882a593Smuzhiyun resolution will be used. 27*4882a593Smuzhiyun - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion 28*4882a593Smuzhiyun - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds 29*4882a593Smuzhiyun - atmel,adc-ts-wires: Number of touchscreen wires. Should be 4 or 5. If this 30*4882a593Smuzhiyun value is set, then the adc driver will enable touchscreen 31*4882a593Smuzhiyun support. 32*4882a593Smuzhiyun NOTE: when adc touchscreen is enabled, the adc hardware trigger will be 33*4882a593Smuzhiyun disabled. Since touchscreen will occupy the trigger register. 34*4882a593Smuzhiyun - atmel,adc-ts-pressure-threshold: a pressure threshold for touchscreen. It 35*4882a593Smuzhiyun makes touch detection more precise. 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunOptional trigger Nodes: 38*4882a593Smuzhiyun - Required properties: 39*4882a593Smuzhiyun * trigger-name: Name of the trigger exposed to the user 40*4882a593Smuzhiyun * trigger-value: Value to put in the Trigger register 41*4882a593Smuzhiyun to activate this trigger 42*4882a593Smuzhiyun - Optional properties: 43*4882a593Smuzhiyun * trigger-external: Is the trigger an external trigger? 44*4882a593Smuzhiyun 45*4882a593SmuzhiyunExamples: 46*4882a593Smuzhiyunadc0: adc@fffb0000 { 47*4882a593Smuzhiyun #address-cells = <1>; 48*4882a593Smuzhiyun #size-cells = <0>; 49*4882a593Smuzhiyun compatible = "atmel,at91sam9260-adc"; 50*4882a593Smuzhiyun reg = <0xfffb0000 0x100>; 51*4882a593Smuzhiyun interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>; 52*4882a593Smuzhiyun clocks = <&adc_clk>, <&adc_op_clk>; 53*4882a593Smuzhiyun clock-names = "adc_clk", "adc_op_clk"; 54*4882a593Smuzhiyun atmel,adc-channels-used = <0xff>; 55*4882a593Smuzhiyun atmel,adc-startup-time = <40>; 56*4882a593Smuzhiyun atmel,adc-use-external-triggers; 57*4882a593Smuzhiyun atmel,adc-vref = <3300>; 58*4882a593Smuzhiyun atmel,adc-res = <8 10>; 59*4882a593Smuzhiyun atmel,adc-res-names = "lowres", "highres"; 60*4882a593Smuzhiyun atmel,adc-use-res = "lowres"; 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun trigger0 { 63*4882a593Smuzhiyun trigger-name = "external-rising"; 64*4882a593Smuzhiyun trigger-value = <0x1>; 65*4882a593Smuzhiyun trigger-external; 66*4882a593Smuzhiyun }; 67*4882a593Smuzhiyun trigger1 { 68*4882a593Smuzhiyun trigger-name = "external-falling"; 69*4882a593Smuzhiyun trigger-value = <0x2>; 70*4882a593Smuzhiyun trigger-external; 71*4882a593Smuzhiyun }; 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun trigger2 { 74*4882a593Smuzhiyun trigger-name = "external-any"; 75*4882a593Smuzhiyun trigger-value = <0x3>; 76*4882a593Smuzhiyun trigger-external; 77*4882a593Smuzhiyun }; 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun trigger3 { 80*4882a593Smuzhiyun trigger-name = "continuous"; 81*4882a593Smuzhiyun trigger-value = <0x6>; 82*4882a593Smuzhiyun }; 83*4882a593Smuzhiyun}; 84