summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2014-08-20 18:10:12 +0000
committerloos <loos@FreeBSD.org>2014-08-20 18:10:12 +0000
commitf091b317e3b5b83ed416bf74264a16b72bb53e6c (patch)
treed15c86ea66f951910939a343529effe42b6c195b /sys/arm
parenta23b573cf161a50b1f242246901aee4ea26396d9 (diff)
downloadFreeBSD-src-f091b317e3b5b83ed416bf74264a16b72bb53e6c.zip
FreeBSD-src-f091b317e3b5b83ed416bf74264a16b72bb53e6c.tar.gz
MFC r266960:
Configure the analog input 7 which, on BBB, is connected to the 3V3B rail through a voltage divisor (R163 and R164 on page 4 of BBB schematic). Add a note about this on ti_adc(4) man page. The ti_adc(4) man page will first appear on 10.1-RELEASE. Suggested by: Sulev-Madis Silber (ketas) Manual page reviewed by: brueffer (D127)
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/ti/ti_adc.c3
-rw-r--r--sys/arm/ti/ti_adcreg.h2
-rw-r--r--sys/arm/ti/ti_adcvar.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/sys/arm/ti/ti_adc.c b/sys/arm/ti/ti_adc.c
index af7d6d0..c5710d7 100644
--- a/sys/arm/ti/ti_adc.c
+++ b/sys/arm/ti/ti_adc.c
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
#include <arm/ti/ti_adcreg.h>
#include <arm/ti/ti_adcvar.h>
-/* Define our 7 steps, one for each input channel. */
+/* Define our 8 steps, one for each input channel. */
static struct ti_adc_input ti_adc_inputs[TI_ADC_NPINS] = {
{ .stepconfig = ADC_STEPCFG1, .stepdelay = ADC_STEPDLY1 },
{ .stepconfig = ADC_STEPCFG2, .stepdelay = ADC_STEPDLY2 },
@@ -59,6 +59,7 @@ static struct ti_adc_input ti_adc_inputs[TI_ADC_NPINS] = {
{ .stepconfig = ADC_STEPCFG5, .stepdelay = ADC_STEPDLY5 },
{ .stepconfig = ADC_STEPCFG6, .stepdelay = ADC_STEPDLY6 },
{ .stepconfig = ADC_STEPCFG7, .stepdelay = ADC_STEPDLY7 },
+ { .stepconfig = ADC_STEPCFG8, .stepdelay = ADC_STEPDLY8 },
};
static int ti_adc_samples[5] = { 0, 2, 4, 8, 16 };
diff --git a/sys/arm/ti/ti_adcreg.h b/sys/arm/ti/ti_adcreg.h
index ffc15a2..1772f25 100644
--- a/sys/arm/ti/ti_adcreg.h
+++ b/sys/arm/ti/ti_adcreg.h
@@ -81,6 +81,8 @@
#define ADC_STEPDLY6 0x090
#define ADC_STEPCFG7 0x094
#define ADC_STEPDLY7 0x098
+#define ADC_STEPCFG8 0x09c
+#define ADC_STEPDLY8 0x0a0
#define ADC_STEP_DIFF_CNTRL (1 << 25)
#define ADC_STEP_RFM_MSK 0x01800000
#define ADC_STEP_RFM_SHIFT 23
diff --git a/sys/arm/ti/ti_adcvar.h b/sys/arm/ti/ti_adcvar.h
index 912a78c..409ec7b 100644
--- a/sys/arm/ti/ti_adcvar.h
+++ b/sys/arm/ti/ti_adcvar.h
@@ -29,7 +29,7 @@
#ifndef _TI_ADCVAR_H_
#define _TI_ADCVAR_H_
-#define TI_ADC_NPINS 7
+#define TI_ADC_NPINS 8
#define ADC_READ4(_sc, reg) bus_read_4((_sc)->sc_mem_res, reg)
#define ADC_WRITE4(_sc, reg, value) \
OpenPOWER on IntegriCloud