aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2015-12-14 08:53:48 -0500
committerLee Jones <lee.jones@linaro.org>2016-02-11 10:35:09 -0500
commit337600fbeeb70e9ec052ca5fe0a09047c70649be (patch)
tree9cd9997518568e74f71bd5eb2b3c9e7b222ea947
parent43de29baa93873b48ed898ef5584c7cfa70ece3c (diff)
iio: Add binding documentation for imx25 GCQ
The documentation describes the bindings for the imx25 GCQ unit which is essentially a generic conversion queue using the imx25 ADC. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt58
-rw-r--r--include/dt-bindings/iio/adc/fsl-imx25-gcq.h18
2 files changed, 76 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
new file mode 100644
index 000000000000..b0866d36a307
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
@@ -0,0 +1,58 @@
1Freescale i.MX25 ADC GCQ device
2
3This is a generic conversion queue device that can convert any of the
4analog inputs using the ADC unit of the i.MX25.
5
6Required properties:
7 - compatible: Should be "fsl,imx25-gcq".
8 - reg: Should be the register range of the module.
9 - interrupts: Should be the interrupt number of the module.
10 Typically this is <1>.
11 - interrupt-parent: phandle to the tsadc module of the i.MX25.
12 - #address-cells: Should be <1> (setting for the subnodes)
13 - #size-cells: Should be <0> (setting for the subnodes)
14
15Optional properties:
16 - vref-ext-supply: The regulator supplying the ADC reference voltage.
17 Required when at least one subnode uses the this reference.
18 - vref-xp-supply: The regulator supplying the ADC reference voltage on pin XP.
19 Required when at least one subnode uses this reference.
20 - vref-yp-supply: The regulator supplying the ADC reference voltage on pin YP.
21 Required when at least one subnode uses this reference.
22
23Sub-nodes:
24Optionally you can define subnodes which define the reference voltage
25for the analog inputs.
26
27Required properties for subnodes:
28 - reg: Should be the number of the analog input.
29 0: xp
30 1: yp
31 2: xn
32 3: yn
33 4: wiper
34 5: inaux0
35 6: inaux1
36 7: inaux2
37Optional properties for subnodes:
38 - fsl,adc-refp: specifies the positive reference input as defined in
39 <dt-bindings/iio/adc/fsl-imx25-gcq.h>
40 - fsl,adc-refn: specifies the negative reference input as defined in
41 <dt-bindings/iio/adc/fsl-imx25-gcq.h>
42
43Example:
44
45 adc: adc@50030800 {
46 compatible = "fsl,imx25-gcq";
47 reg = <0x50030800 0x60>;
48 interrupt-parent = <&tscadc>;
49 interrupts = <1>;
50 #address-cells = <1>;
51 #size-cells = <0>;
52
53 inaux@5 {
54 reg = <5>;
55 fsl,adc-refp = <MX25_ADC_REFP_INT>;
56 fsl,adc-refn = <MX25_ADC_REFN_NGND>;
57 };
58 };
diff --git a/include/dt-bindings/iio/adc/fsl-imx25-gcq.h b/include/dt-bindings/iio/adc/fsl-imx25-gcq.h
new file mode 100644
index 000000000000..87abdd4a7674
--- /dev/null
+++ b/include/dt-bindings/iio/adc/fsl-imx25-gcq.h
@@ -0,0 +1,18 @@
1/*
2 * This header provides constants for configuring the I.MX25 ADC
3 */
4
5#ifndef _DT_BINDINGS_IIO_ADC_FS_IMX25_GCQ_H
6#define _DT_BINDINGS_IIO_ADC_FS_IMX25_GCQ_H
7
8#define MX25_ADC_REFP_YP 0 /* YP voltage reference */
9#define MX25_ADC_REFP_XP 1 /* XP voltage reference */
10#define MX25_ADC_REFP_EXT 2 /* External voltage reference */
11#define MX25_ADC_REFP_INT 3 /* Internal voltage reference */
12
13#define MX25_ADC_REFN_XN 0 /* XN ground reference */
14#define MX25_ADC_REFN_YN 1 /* YN ground reference */
15#define MX25_ADC_REFN_NGND 2 /* Internal ground reference */
16#define MX25_ADC_REFN_NGND2 3 /* External ground reference */
17
18#endif