Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1576041 > unrolled thread

[PATCH 1/3] ARM: da850-lego-ev3: Add device tree node for A/DC

Started byDavid Lechner <david@lechnology.com>
First post2017-02-07 21:40 +0100
Last post2017-02-07 21:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/3] ARM: da850-lego-ev3: Add device tree node for A/DC David Lechner <david@lechnology.com> - 2017-02-07 21:40 +0100

#1576041 — [PATCH 1/3] ARM: da850-lego-ev3: Add device tree node for A/DC

FromDavid Lechner <david@lechnology.com>
Date2017-02-07 21:40 +0100
Subject[PATCH 1/3] ARM: da850-lego-ev3: Add device tree node for A/DC
Message-ID<t8kIq-7B3-25@gated-at.bofh.it>
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>
---
 arch/arm/boot/dts/da850-lego-ev3.dts | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
index 112ec92..0309537 100644
--- a/arch/arm/boot/dts/da850-lego-ev3.dts
+++ b/arch/arm/boot/dts/da850-lego-ev3.dts
@@ -139,6 +139,19 @@
 		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 {
@@ -293,6 +306,14 @@
 			};
 		};
 	};
+
+	adc: adc@3 {
+		compatible = "ti,ads7957";
+		reg = <3>;
+		#io-channel-cells = <1>;
+		spi-max-frequency = <10000000>;
+		vref-supply = <&adc_ref>;
+	};
 };
 
 &gpio {
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web