Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Markus Pargmann and committed by
Lee Jones
337600fb 43de29ba

+76
+58
Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
··· 1 + Freescale i.MX25 ADC GCQ device 2 + 3 + This is a generic conversion queue device that can convert any of the 4 + analog inputs using the ADC unit of the i.MX25. 5 + 6 + Required 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 + 15 + Optional 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 + 23 + Sub-nodes: 24 + Optionally you can define subnodes which define the reference voltage 25 + for the analog inputs. 26 + 27 + Required 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 37 + Optional 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 + 43 + Example: 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 + };
+18
include/dt-bindings/iio/adc/fsl-imx25-gcq.h
··· 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