All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: mfd: ti_am335x_tscadc: increase ADC ref clock to 24MHz
@ 2016-10-24  6:02 ` Mugunthan V N
  0 siblings, 0 replies; 57+ messages in thread
From: Mugunthan V N @ 2016-10-24  6:02 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-iio, Tony Lindgren, Jonathan Cameron, Vignesh R,
	linux-omap, linux-arm-kernel, linux-kernel, Sekhar Nori,
	Peter Ujfalusi, John Syne, Mugunthan V N

Increase ADC reference clock from 3MHz to 24MHz so that the
sampling rates goes up from 100K samples per second to 800K
samples per second on AM335x and AM437x SoC.

Also increase opendelay for touchscreen configuration to
equalize the increase in ADC reference clock frequency,
which results in the same amount touch events reported via
evtest on AM335x GP EVM.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---

This patch depends on ADC DMA patch series [1]

Without DMA support, when ADC ref clock is set at 24MHz, I am
seeing fifo overflow as CPU is not able to pull the ADC samples.
This answers that DMA support is must for ADC to consume the
samples generated at 24MHz with no open, step delay or
averaging with patch [2].

Measured the performance with the iio_generic_buffer with the
patch [3] applied

[1] - http://www.spinics.net/lists/devicetree/msg145045.html
[2] - http://pastebin.ubuntu.com/23357935/
[3] - http://pastebin.ubuntu.com/23357939/

---
 include/linux/mfd/ti_am335x_tscadc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
index b9a53e0..96c4207 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -90,7 +90,7 @@
 /* Delay register */
 #define STEPDELAY_OPEN_MASK	(0x3FFFF << 0)
 #define STEPDELAY_OPEN(val)	((val) << 0)
-#define STEPCONFIG_OPENDLY	STEPDELAY_OPEN(0x098)
+#define STEPCONFIG_OPENDLY	STEPDELAY_OPEN(0x500)
 #define STEPDELAY_SAMPLE_MASK	(0xFF << 24)
 #define STEPDELAY_SAMPLE(val)	((val) << 24)
 #define STEPCONFIG_SAMPLEDLY	STEPDELAY_SAMPLE(0)
@@ -137,7 +137,7 @@
 #define SEQ_STATUS BIT(5)
 #define CHARGE_STEP		0x11
 
-#define ADC_CLK			3000000
+#define ADC_CLK			24000000
 #define TOTAL_STEPS		16
 #define TOTAL_CHANNELS		8
 #define FIFO1_THRESHOLD		19
-- 
2.10.1.502.g6598894

^ permalink raw reply related	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2016-11-11  6:17 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-24  6:02 [PATCH] drivers: mfd: ti_am335x_tscadc: increase ADC ref clock to 24MHz Mugunthan V N
2016-10-24  6:02 ` Mugunthan V N
2016-10-24  6:02 ` Mugunthan V N
2016-10-24 20:58 ` John Syne
2016-10-24 20:58   ` John Syne
2016-10-24 20:58   ` John Syne
2016-10-25  5:52   ` Mugunthan V N
2016-10-25  5:52     ` Mugunthan V N
2016-10-25  5:52     ` Mugunthan V N
2016-10-25  6:01     ` John Syne
2016-10-25  6:01       ` John Syne
2016-10-25  6:01       ` John Syne
2016-10-25  6:16       ` John Syne
2016-10-25  6:16         ` John Syne
2016-10-25  6:16         ` John Syne
2016-10-25  6:37         ` Vignesh R
2016-10-25  6:37           ` Vignesh R
2016-10-25  6:37           ` Vignesh R
2016-10-25 15:39           ` John Syne
2016-10-25 15:39             ` John Syne
2016-10-25 15:39             ` John Syne
2016-10-25 15:39             ` John Syne
2016-10-25  6:38         ` Lee Jones
2016-10-25  6:38           ` Lee Jones
2016-10-25  6:38           ` Lee Jones
2016-10-25 15:47           ` John Syne
2016-10-25 15:47             ` John Syne
2016-10-25 15:47             ` John Syne
2016-10-25 15:47             ` John Syne
2016-10-26  8:48             ` Lee Jones
2016-10-26  8:48               ` Lee Jones
2016-10-26 19:33               ` John Syne
2016-10-27 21:14               ` John Syne
2016-10-27 21:17               ` John Syne
2016-10-27 21:17                 ` John Syne
2016-10-27 21:17                 ` John Syne
2016-10-31 11:39                 ` Vignesh R
2016-10-31 11:39                   ` Vignesh R
2016-10-31 11:39                   ` Vignesh R
2016-11-09 23:53                   ` John Syne
2016-11-09 23:53                     ` John Syne
2016-11-09 23:53                     ` John Syne
2016-11-10  5:07                     ` Vignesh R
2016-11-10  5:07                       ` Vignesh R
2016-11-10  5:07                       ` Vignesh R
2016-11-10  5:07                       ` Vignesh R
2016-11-11  3:30                       ` John Syne
2016-11-11  3:30                         ` John Syne
2016-11-11  3:30                         ` John Syne
2016-11-11  3:30                         ` John Syne
2016-11-11  6:17                         ` Vignesh R
2016-11-11  6:17                           ` Vignesh R
2016-11-11  6:17                           ` Vignesh R
2016-11-11  6:17                           ` Vignesh R
2016-10-27 11:20 ` Mugunthan V N
2016-10-27 11:20   ` Mugunthan V N
2016-10-27 11:20   ` Mugunthan V N

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.