aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt52
-rw-r--r--Documentation/devicetree/bindings/iio/iio-bindings.txt97
2 files changed, 149 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
new file mode 100644
index 000000000000..05e9d95ede5c
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
@@ -0,0 +1,52 @@
1Samsung Exynos Analog to Digital Converter bindings
2
3This devicetree binding are for the new adc driver written fori
4Exynos4 and upward SoCs from Samsung.
5
6New driver handles the following
71. Supports ADC IF found on EXYNOS4412/EXYNOS5250
8 and future SoCs from Samsung
92. Add ADC driver under iio/adc framework
103. Also adds the Documentation for device tree bindings
11
12Required properties:
13- compatible: Must be "samsung,exynos-adc-v1"
14 for exynos4412/5250 controllers.
15 Must be "samsung,exynos-adc-v2" for
16 future controllers.
17- reg: Contains ADC register address range (base address and
18 length) and the address of the phy enable register.
19- interrupts: Contains the interrupt information for the timer. The
20 format is being dependent on which interrupt controller
21 the Samsung device uses.
22- #io-channel-cells = <1>; As ADC has multiple outputs
23
24Note: child nodes can be added for auto probing from device tree.
25
26Example: adding device info in dtsi file
27
28adc: adc@12D10000 {
29 compatible = "samsung,exynos-adc-v1";
30 reg = <0x12D10000 0x100>, <0x10040718 0x4>;
31 interrupts = <0 106 0>;
32 #io-channel-cells = <1>;
33 io-channel-ranges;
34};
35
36
37Example: Adding child nodes in dts file
38
39adc@12D10000 {
40
41 /* NTC thermistor is a hwmon device */
42 ncp15wb473@0 {
43 compatible = "ntc,ncp15wb473";
44 pullup-uV = <1800000>;
45 pullup-ohm = <47000>;
46 pulldown-ohm = <0>;
47 io-channels = <&adc 4>;
48 };
49};
50
51Note: Does not apply to ADC driver under arch/arm/plat-samsung/
52Note: The child node can be added under the adc node or seperately.
diff --git a/Documentation/devicetree/bindings/iio/iio-bindings.txt b/Documentation/devicetree/bindings/iio/iio-bindings.txt
new file mode 100644
index 000000000000..0b447d9ad196
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/iio-bindings.txt
@@ -0,0 +1,97 @@
1This binding is derived from clock bindings, and based on suggestions
2from Lars-Peter Clausen [1].
3
4Sources of IIO channels can be represented by any node in the device
5tree. Those nodes are designated as IIO providers. IIO consumer
6nodes use a phandle and IIO specifier pair to connect IIO provider
7outputs to IIO inputs. Similar to the gpio specifiers, an IIO
8specifier is an array of one or more cells identifying the IIO
9output on a device. The length of an IIO specifier is defined by the
10value of a #io-channel-cells property in the IIO provider node.
11
12[1] http://marc.info/?l=linux-iio&m=135902119507483&w=2
13
14==IIO providers==
15
16Required properties:
17#io-channel-cells: Number of cells in an IIO specifier; Typically 0 for nodes
18 with a single IIO output and 1 for nodes with multiple
19 IIO outputs.
20
21Example for a simple configuration with no trigger:
22
23 adc: voltage-sensor@35 {
24 compatible = "maxim,max1139";
25 reg = <0x35>;
26 #io-channel-cells = <1>;
27 };
28
29Example for a configuration with trigger:
30
31 adc@35 {
32 compatible = "some-vendor,some-adc";
33 reg = <0x35>;
34
35 adc1: iio-device@0 {
36 #io-channel-cells = <1>;
37 /* other properties */
38 };
39 adc2: iio-device@1 {
40 #io-channel-cells = <1>;
41 /* other properties */
42 };
43 };
44
45==IIO consumers==
46
47Required properties:
48io-channels: List of phandle and IIO specifier pairs, one pair
49 for each IIO input to the device. Note: if the
50 IIO provider specifies '0' for #io-channel-cells,
51 then only the phandle portion of the pair will appear.
52
53Optional properties:
54io-channel-names:
55 List of IIO input name strings sorted in the same
56 order as the io-channels property. Consumers drivers
57 will use io-channel-names to match IIO input names
58 with IIO specifiers.
59io-channel-ranges:
60 Empty property indicating that child nodes can inherit named
61 IIO channels from this node. Useful for bus nodes to provide
62 and IIO channel to their children.
63
64For example:
65
66 device {
67 io-channels = <&adc 1>, <&ref 0>;
68 io-channel-names = "vcc", "vdd";
69 };
70
71This represents a device with two IIO inputs, named "vcc" and "vdd".
72The vcc channel is connected to output 1 of the &adc device, and the
73vdd channel is connected to output 0 of the &ref device.
74
75==Example==
76
77 adc: max1139@35 {
78 compatible = "maxim,max1139";
79 reg = <0x35>;
80 #io-channel-cells = <1>;
81 };
82
83 ...
84
85 iio_hwmon {
86 compatible = "iio-hwmon";
87 io-channels = <&adc 0>, <&adc 1>, <&adc 2>,
88 <&adc 3>, <&adc 4>, <&adc 5>,
89 <&adc 6>, <&adc 7>, <&adc 8>,
90 <&adc 9>;
91 };
92
93 some_consumer {
94 compatible = "some-consumer";
95 io-channels = <&adc 10>, <&adc 11>;
96 io-channel-names = "adc1", "adc2";
97 };