1 From 6d5e32067cf3f3169ec15097c175878de365d247 Mon Sep 17 00:00:00 2001
2 From: Scott Ellis <scott@jumpnowtek.com>
3 Date: Wed, 1 Mar 2017 07:22:24 -0500
4 Subject: [PATCH] Add overlay for ads1115 ADCs (#1864)
7 arch/arm/boot/dts/overlays/Makefile | 1 +
8 arch/arm/boot/dts/overlays/README | 22 ++++++
9 arch/arm/boot/dts/overlays/ads1115-overlay.dts | 103 +++++++++++++++++++++++++
10 3 files changed, 126 insertions(+)
11 create mode 100644 arch/arm/boot/dts/overlays/ads1115-overlay.dts
13 --- a/arch/arm/boot/dts/overlays/Makefile
14 +++ b/arch/arm/boot/dts/overlays/Makefile
15 @@ -4,6 +4,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
17 adau7002-simple.dtbo \
21 akkordion-iqdacplus.dtbo \
22 allo-piano-dac-pcm512x-audio.dtbo \
23 --- a/arch/arm/boot/dts/overlays/README
24 +++ b/arch/arm/boot/dts/overlays/README
25 @@ -196,6 +196,28 @@ Params: addr I2C bus
26 http://www.ti.com/lit/ds/symlink/ads1015.pdf
30 +Info: Texas Instruments ADS1115 ADC
31 +Load: dtoverlay=ads1115,<param>[=<val>]
32 +Params: addr I2C bus address of device. Set based on how the
33 + addr pin is wired. (default=0x48 assumes addr
35 + cha_enable Enable virtual channel a.
36 + cha_cfg Set the configuration for virtual channel a.
37 + (default=4 configures this channel for the
38 + voltage at A0 with respect to GND)
39 + cha_datarate Set the datarate (samples/sec) for this channel.
40 + (default=7 sets 860 sps)
41 + cha_gain Set the gain of the Programmable Gain
42 + Amplifier for this channel. (Default 1 sets the
43 + full scale of the channel to 4.096 Volts)
45 + Channel parameters can be set for each enabled channel.
46 + A maximum of 4 channels can be enabled (letters a thru d).
47 + For more information refer to the device datasheet at:
48 + http://www.ti.com/lit/ds/symlink/ads1115.pdf
52 Info: ADS7846 Touch controller
53 Load: dtoverlay=ads7846,<param>=<val>
55 +++ b/arch/arm/boot/dts/overlays/ads1115-overlay.dts
58 + * TI ADS1115 multi-channel ADC overlay
65 + compatible = "brcm,bcm2708";
68 + target = <&i2c_arm>;
70 + #address-cells = <1>;
75 + compatible = "ti,ads1115";
77 + #address-cells = <1>;
85 + target-path = "i2c_arm/ads1115";
87 + #address-cells = <1>;
90 + channel_a: channel_a {
99 + target-path = "i2c_arm/ads1115";
101 + #address-cells = <1>;
104 + channel_b: channel_b {
113 + target-path = "i2c_arm/ads1115";
115 + #address-cells = <1>;
118 + channel_c: channel_c {
127 + target-path = "i2c_arm/ads1115";
129 + #address-cells = <1>;
132 + channel_d: channel_d {
141 + addr = <&ads1115>,"reg:0";
142 + cha_enable = <0>,"=1";
143 + cha_cfg = <&channel_a>,"reg:0";
144 + cha_gain = <&channel_a>,"ti,gain:0";
145 + cha_datarate = <&channel_a>,"ti,datarate:0";
146 + chb_enable = <0>,"=2";
147 + chb_cfg = <&channel_b>,"reg:0";
148 + chb_gain = <&channel_b>,"ti,gain:0";
149 + chb_datarate = <&channel_b>,"ti,datarate:0";
150 + chc_enable = <0>,"=3";
151 + chc_cfg = <&channel_c>,"reg:0";
152 + chc_gain = <&channel_c>,"ti,gain:0";
153 + chc_datarate = <&channel_c>,"ti,datarate:0";
154 + chd_enable = <0>,"=4";
155 + chd_cfg = <&channel_d>,"reg:0";
156 + chd_gain = <&channel_d>,"ti,gain:0";
157 + chd_datarate = <&channel_d>,"ti,datarate:0";