[PATCH 4/4] ARM: beaglebone: Enable ADC

Trent Piepho trent.piepho at synapse.com
Wed Sep 9 15:36:50 EDT 2020


On the BeagleBone Black, enable the dts node for the TSC/ADC.  Add a
simple configuration that maps all eight channels in order.  AIN[0:6]
are exposed on connector P9, while AIN7 measures the 3.3V rail divided
by 2.

Signed-off-by: Trent Piepho <trent.piepho at synapse.com>
---
 arch/arm/dts/am335x-boneblack.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/dts/am335x-boneblack.dts b/arch/arm/dts/am335x-boneblack.dts
index 80d710b92..c06a532e4 100644
--- a/arch/arm/dts/am335x-boneblack.dts
+++ b/arch/arm/dts/am335x-boneblack.dts
@@ -85,3 +85,13 @@
 		status = "okay";
 	};
 };
+
+&tscadc {
+	status = "okay";
+	adc {
+		/* Ch 0-6 are on connector P9.	Ch 7 measures the 3.3V rail
+		 * divided by 2 (e.g., it should read 1650).
+		 */
+		ti,adc-channels = <0>, <1>, <2>, <3>, <4>, <5>, <6>, <7>;
+	};
+};
-- 
2.25.4




More information about the barebox mailing list