ARM: da850-lego-ev3: Add device tree node for A/DC
authorDavid Lechner <david@lechnology.com>
Tue, 7 Feb 2017 19:22:07 +0000 (13:22 -0600)
committerSekhar Nori <nsekhar@ti.com>
Tue, 7 Mar 2017 10:04:08 +0000 (15:34 +0530)
This adds a node for the TI ADS7957 analog/digital converter on LEGO
MINDSTORMS EV3 as well as a regulator node that is used by the A/DC node.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/boot/dts/da850-lego-ev3.dts

index 112ec92064cea56732a783eabbbafe26983989ba..03095372ce68b2eaa5f3b9fc0f1b71460f1ec087 100644 (file)
                enable-active-high;
                regulator-boot-on;
        };
+
+       /*
+        * This is a simple voltage divider on VCC5V to provide a 2.5V
+        * reference signal to the ADC.
+        */
+       adc_ref: regulator2 {
+               compatible = "regulator-fixed";
+               regulator-name = "adc ref";
+               regulator-min-microvolt = <2500000>;
+               regulator-max-microvolt = <2500000>;
+               regulator-boot-on;
+               vin-supply = <&vcc5v>;
+       };
 };
 
 &pmx_core {
                        };
                };
        };
+
+       adc: adc@3 {
+               compatible = "ti,ads7957";
+               reg = <3>;
+               #io-channel-cells = <1>;
+               spi-max-frequency = <10000000>;
+               vref-supply = <&adc_ref>;
+       };
 };
 
 &gpio {