summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/iio/adc/ingenic,adc.txt
blob: cd9048cf9dcf9276d0f0d756a10467e27e16cdca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
* Ingenic JZ47xx ADC controller IIO bindings

Required properties:

- compatible: Should be one of:
  * ingenic,jz4725b-adc
  * ingenic,jz4740-adc
  * ingenic,jz4770-adc
- reg: ADC controller registers location and length.
- clocks: phandle to the SoC's ADC clock.
- clock-names: Must be set to "adc".
- #io-channel-cells: Must be set to <1> to indicate channels are selected
  by index.

ADC clients must use the format described in iio-bindings.txt, giving
a phandle and IIO specifier pair ("io-channels") to the ADC controller.

Example:

#include <dt-bindings/iio/adc/ingenic,adc.h>

adc: adc@10070000 {
	compatible = "ingenic,jz4740-adc";
	#io-channel-cells = <1>;

	reg = <0x10070000 0x30>;

	clocks = <&cgu JZ4740_CLK_ADC>;
	clock-names = "adc";

	interrupt-parent = <&intc>;
	interrupts = <18>;
};

adc-keys {
	...
	compatible = "adc-keys";
	io-channels = <&adc INGENIC_ADC_AUX>;
	io-channel-names = "buttons";
	...
};

battery {
	...
	compatible = "ingenic,jz4740-battery";
	io-channels = <&adc INGENIC_ADC_BATTERY>;
	io-channel-names = "battery";
	...
};