devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>,
	David Lechner <david@lechnology.com>,
	Kevin Hilman <khilman@baylibre.com>, Sekhar Nori <nsekhar@ti.com>,
	linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>
Subject: [PATCH 1/3] ARM: da850-lego-ev3: Add device tree node for A/DC
Date: Tue,  7 Feb 2017 13:22:07 -0600	[thread overview]
Message-ID: <1486495329-2789-2-git-send-email-david@lechnology.com> (raw)
In-Reply-To: <1486495329-2789-1-git-send-email-david@lechnology.com>

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

  reply	other threads:[~2017-02-07 19:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 19:22 [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 David Lechner
2017-02-07 19:22 ` David Lechner [this message]
2017-02-07 19:22 ` [PATCH 2/3] ARM: davinci_all_defconfig: Enable TI ADS7950 David Lechner
2017-02-07 19:22 ` [PATCH 3/3] ARM: da850-lego-ev3: Add device tree node for sound David Lechner
     [not found] ` <1486495329-2789-1-git-send-email-david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
2017-02-20 10:36   ` [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 Sekhar Nori
2017-03-07 10:41     ` Sekhar Nori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1486495329-2789-2-git-send-email-david@lechnology.com \
    --to=david@lechnology.com \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nsekhar@ti.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).