From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941501AbcJYFxZ (ORCPT ); Tue, 25 Oct 2016 01:53:25 -0400 Received: from bear.ext.ti.com ([198.47.19.11]:49618 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932841AbcJYFxV (ORCPT ); Tue, 25 Oct 2016 01:53:21 -0400 Subject: Re: [PATCH] drivers: mfd: ti_am335x_tscadc: increase ADC ref clock to 24MHz To: John Syne References: <20161024060226.4170-1-mugunthanvnm@ti.com> <038C6B01-8443-4321-9C65-BAC4095237D3@gmail.com> CC: Lee Jones , , Tony Lindgren , Jonathan Cameron , Vignesh R , , , , Sekhar Nori , Peter Ujfalusi From: Mugunthan V N Message-ID: <086ab2fa-63ee-c5ab-2715-b2efd78270d7@ti.com> Date: Tue, 25 Oct 2016 11:22:46 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <038C6B01-8443-4321-9C65-BAC4095237D3@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 25 October 2016 02:28 AM, John Syne wrote: >> > On Oct 23, 2016, at 11:02 PM, Mugunthan V N wrote: >> > >> > 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 >> > --- >> > >> > 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) > Wouldn’t this be better to add this to the devicetree? > > ti,chan-step-avg = <0x16 0x16 0x16 0x16 0x16 0x16 0x16>; > ti,chan-step-opendelay = <0x500 0x500 0x500 0x500 0x500 0x500 0x500>; > ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 0x0 0x0 0x0>; For a touch screen, there is not need to change in these parameter settings, so my opinion is to keep it as is. Or am I missing something? Regards Mugunthan V N From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mugunthan V N Subject: Re: [PATCH] drivers: mfd: ti_am335x_tscadc: increase ADC ref clock to 24MHz Date: Tue, 25 Oct 2016 11:22:46 +0530 Message-ID: <086ab2fa-63ee-c5ab-2715-b2efd78270d7@ti.com> References: <20161024060226.4170-1-mugunthanvnm@ti.com> <038C6B01-8443-4321-9C65-BAC4095237D3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <038C6B01-8443-4321-9C65-BAC4095237D3@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: John Syne Cc: Lee Jones , linux-iio@vger.kernel.org, Tony Lindgren , Jonathan Cameron , Vignesh R , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sekhar Nori , Peter Ujfalusi List-Id: linux-omap@vger.kernel.org On Tuesday 25 October 2016 02:28 AM, John Syne wrote: >> > On Oct 23, 2016, at 11:02 PM, Mugunthan V N wrote: >> > >> > 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 >> > --- >> > >> > 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) > Wouldn’t this be better to add this to the devicetree? > > ti,chan-step-avg = <0x16 0x16 0x16 0x16 0x16 0x16 0x16>; > ti,chan-step-opendelay = <0x500 0x500 0x500 0x500 0x500 0x500 0x500>; > ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 0x0 0x0 0x0>; For a touch screen, there is not need to change in these parameter settings, so my opinion is to keep it as is. Or am I missing something? Regards Mugunthan V N From mboxrd@z Thu Jan 1 00:00:00 1970 From: mugunthanvnm@ti.com (Mugunthan V N) Date: Tue, 25 Oct 2016 11:22:46 +0530 Subject: [PATCH] drivers: mfd: ti_am335x_tscadc: increase ADC ref clock to 24MHz In-Reply-To: <038C6B01-8443-4321-9C65-BAC4095237D3@gmail.com> References: <20161024060226.4170-1-mugunthanvnm@ti.com> <038C6B01-8443-4321-9C65-BAC4095237D3@gmail.com> Message-ID: <086ab2fa-63ee-c5ab-2715-b2efd78270d7@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tuesday 25 October 2016 02:28 AM, John Syne wrote: >> > On Oct 23, 2016, at 11:02 PM, Mugunthan V N wrote: >> > >> > 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 >> > --- >> > >> > 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) > Wouldn?t this be better to add this to the devicetree? > > ti,chan-step-avg = <0x16 0x16 0x16 0x16 0x16 0x16 0x16>; > ti,chan-step-opendelay = <0x500 0x500 0x500 0x500 0x500 0x500 0x500>; > ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 0x0 0x0 0x0>; For a touch screen, there is not need to change in these parameter settings, so my opinion is to keep it as is. Or am I missing something? Regards Mugunthan V N