xref: /freebsd/sys/contrib/device-tree/Bindings/iio/adc/at91-sama5d2_adc.txt (revision 2a58b312b62f908ec92311d1bd8536dbaeb8e55b)
1* AT91 SAMA5D2 Analog to Digital Converter (ADC)
2
3Required properties:
4  - compatible: Should be "atmel,sama5d2-adc" or "microchip,sam9x60-adc".
5  - reg: Should contain ADC registers location and length.
6  - interrupts: Should contain the IRQ line for the ADC.
7  - clocks: phandle to device clock.
8  - clock-names: Must be "adc_clk".
9  - vref-supply: Supply used as reference for conversions.
10  - vddana-supply: Supply for the adc device.
11  - atmel,min-sample-rate-hz: Minimum sampling rate, it depends on SoC.
12  - atmel,max-sample-rate-hz: Maximum sampling rate, it depends on SoC.
13  - atmel,startup-time-ms: Startup time expressed in ms, it depends on SoC.
14  - atmel,trigger-edge-type: One of possible edge types for the ADTRG hardware
15  trigger pin. When the specific edge type is detected, the conversion will
16  start. Possible values are rising, falling, or both.
17  This property uses the IRQ edge types values: IRQ_TYPE_EDGE_RISING ,
18  IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH
19
20Optional properties:
21  - dmas: Phandle to dma channel for the ADC.
22  - dma-names: Must be "rx" when dmas property is being used.
23  See ../../dma/dma.txt for details.
24  - #io-channel-cells: in case consumer drivers are attached, this must be 1.
25  See <Documentation/devicetree/bindings/iio/iio-bindings.txt> for details.
26
27Properties for consumer drivers:
28  - Consumer drivers can be connected to this producer device, as specified
29  in <Documentation/devicetree/bindings/iio/iio-bindings.txt>
30  - Channels exposed are specified in:
31  <dt-bindings/iio/adc/at91-sama5d2_adc.txt>
32
33Example:
34
35adc: adc@fc030000 {
36	compatible = "atmel,sama5d2-adc";
37	reg = <0xfc030000 0x100>;
38	interrupts = <40 IRQ_TYPE_LEVEL_HIGH 7>;
39	clocks = <&adc_clk>;
40	clock-names = "adc_clk";
41	atmel,min-sample-rate-hz = <200000>;
42	atmel,max-sample-rate-hz = <20000000>;
43	atmel,startup-time-ms = <4>;
44	vddana-supply = <&vdd_3v3_lp_reg>;
45	vref-supply = <&vdd_3v3_lp_reg>;
46	atmel,trigger-edge-type = <IRQ_TYPE_EDGE_BOTH>;
47	dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(25))>;
48	dma-names = "rx";
49	#io-channel-cells = <1>;
50}
51