From: Mugunthan V N <hidden> Date: 2016-11-10 16:49:30
This patch series enables ADC to be clocked at 24MHz as the
TI AM335x ADC driver has already adopted to use DMA to transfer
ADC samples. Now ADC can generated upto 800K Samples per second
with the patch [1] on AM335x BBB and AM437x GP EVM.
when ADC ref clock is set at 24MHz, I am seeing some issue with
touch screen pointer as the pointer jumps to random locations
with free draw application. The issue is due to increase in ADC
clock and charge delay for the touchscreen ADC line duration
reduced.
So the notation of ti,charge-delay in terms of ADC clock is
wrong, it has to be represented in time and driver has to convert
the charge delay time to ADC clocks based on what ADC clock
frequency is set.
Measured the performance with the iio_generic_buffer with the
patch [2] applied
Verified the touch screen on AM335x GP EVM and AM335x BBB LCD7
cape with [3] dts for display and touch screen to work.
Changes from initial version:
* Removed modification to STEPCONFIG_OPENDLY defined as it
doesn't affect/improve touchscreen performance.
* Changed ti,charge-delay to ti,charge-delay-ns
[1] - http://pastebin.ubuntu.com/23357935/
[2] - http://pastebin.ubuntu.com/23357939/
[3] - http://pastebin.ubuntu.com/23456616/
Mugunthan V N (3):
dt/binding: ti-tsc-adc: deprecate ti,charge-delay and add binding doc
for ti,charge-delay-ns
Input: ti_am335x_tsc: Add support for ti,charge-delay-ns
drivers: mfd: ti_am335x_tscadc: increase ADC ref clock to 24MHz
.../bindings/input/touchscreen/ti-tsc-adc.txt | 32 ++++++++++++++--------
drivers/input/touchscreen/ti_am335x_tsc.c | 31 +++++++++++++++------
include/linux/mfd/ti_am335x_tscadc.h | 2 +-
3 files changed, 45 insertions(+), 20 deletions(-)
--
2.11.0.rc0.7.gbe5a750
From: Mugunthan V N <hidden> Date: 2016-11-10 18:18:08
ti,charge-delay represents the duration that ADC should wait
before sampling the ADC line to detect the touch location and pen
up/downs. Currently the ADC clock is set at 3MHz. The device-tree
entry for ti,charge-delay is based on assumption of ADC clock at
3MHz, but it can be operated up to 24MHz clock. Representing the
charge delay of touchscreen in terms of ADC clocks is incorrect.
So change this representation to ti,charge-delay-ns, which driver
can convert it to number clock cycles based on ref clock
frequency.
Signed-off-by: Mugunthan V N <redacted>
---
.../bindings/input/touchscreen/ti-tsc-adc.txt | 32 ++++++++++++++--------
1 file changed, 21 insertions(+), 11 deletions(-)
@@ -30,17 +30,27 @@ Required properties: Optional properties: - child "tsc"- ti,charge-delay: Length of touch screen charge delay step in terms of- ADC clock cycles. Charge delay value should be large- in order to avoid false pen-up events. This value- effects the overall sampling speed, hence need to be- kept as low as possible, while avoiding false pen-up- event. Start from a lower value, say 0x400, and- increase value until false pen-up events are avoided.- The pen-up detection happens immediately after the- charge step, so this does in fact function as a- hardware knob for adjusting the amount of "settling- time".+ ti,charge-delay-ns: Length of touch screen charge delay step in terms of+ nano Seconds. Charge delay value should be large+ in order to avoid false pen-up events. This value+ effects the overall sampling speed, hence need to be+ kept as low as possible, while avoiding false pen-up+ event. Start from a lower value, say 41000nS, and+ increase value until false pen-up events are avoided.+ The pen-up detection happens immediately after the+ charge step, so this does in fact function as a+ hardware knob for adjusting the amount of "settling+ time".+ ti,charge-delay: Deprecated as representing charge delay should be+ represented in time as the ADC clock may be different.+ Currently this value is calculated based on 3MHz ADC+ ref clock, but ADC clock can operate upto 24MHz clock.+ ADC clock will be changed to 24MHz to increase the+ number of ADC samples. So to keep the backward+ compatibility, driver will consider this value is+ calculated for 3MHz clock so the value will be+ multiplied by 8 to compensate the change in reference+ clock. - child "adc" ti,chan-step-opendelay: List of open delays for each channel of
--
2.11.0.rc0.7.gbe5a750
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Mugunthan V N <hidden> Date: 2016-11-12 23:51:50
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.
Signed-off-by: Mugunthan V N <redacted>
---
include/linux/mfd/ti_am335x_tscadc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.11.0.rc0.7.gbe5a750
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Mugunthan V N <hidden> Date: 2016-11-13 05:32:51
ti,charge-delay will be deprecated as it represents number of
clock cycles and the DT entries are done in assumption of 3MHz
TSCADC clock, but clock can be set upto 24MHz. So driver add
support for ti,charge-delay-ns and do not drop support for
ti,charge-delay to support old dtbs and it will be assumed that
it is for 3MHz TSCADC clock and will be calculated as per current
clock speed.
Signed-off-by: Mugunthan V N <redacted>
---
drivers/input/touchscreen/ti_am335x_tsc.c | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
@@ -379,15 +379,30 @@ static int titsc_parse_dt(struct platform_device *pdev,ts_dev->coordinate_readouts=5;}-err=of_property_read_u32(node,"ti,charge-delay",+err=of_property_read_u32(node,"ti,charge-delay-ns",&ts_dev->charge_delay);-/*-*Ifti,charge-delayvalueisnotspecified,thenuse-*CHARGEDLY_OPENDLYasthedefaultvalue.-*/-if(err<0){-ts_dev->charge_delay=CHARGEDLY_OPENDLY;-dev_warn(&pdev->dev,"ti,charge-delay not specified\n");+if(err>=0){+u64charge_delay=ts_dev->charge_delay;++charge_delay*=ADC_CLK;+do_div(charge_delay,1E9);+ts_dev->charge_delay=(u32)charge_delay;+}else{+err=of_property_read_u32(node,"ti,charge-delay",+&ts_dev->charge_delay);+/*+*Ifti,charge-delayvalueisnotspecified,thenuse+*CHARGEDLY_OPENDLYasthedefaultvalue.+*/+if(err<0){+ts_dev->charge_delay=CHARGEDLY_OPENDLY;+dev_warn(&pdev->dev,"ti,charge-delay not specified\n");+}+/*+*ti,charge-delayisspecifiedwithreferrenceto3MHz,+*soconvertittoinreferrencetocurrentclock+*/+ts_dev->charge_delay*=ADC_CLK/3000000;}returnof_property_read_u32_array(node,"ti,wire-config",
--
2.11.0.rc0.7.gbe5a750
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Rob Herring <robh@kernel.org> Date: 2016-11-15 01:54:49
On Thu, Nov 10, 2016 at 10:05:13PM +0530, Mugunthan V N wrote:
ti,charge-delay represents the duration that ADC should wait
before sampling the ADC line to detect the touch location and pen
up/downs. Currently the ADC clock is set at 3MHz. The device-tree
entry for ti,charge-delay is based on assumption of ADC clock at
3MHz, but it can be operated up to 24MHz clock. Representing the
charge delay of touchscreen in terms of ADC clocks is incorrect.
So change this representation to ti,charge-delay-ns, which driver
can convert it to number clock cycles based on ref clock
frequency.
Signed-off-by: Mugunthan V N <redacted>
---
.../bindings/input/touchscreen/ti-tsc-adc.txt | 32 ++++++++++++++--------
1 file changed, 21 insertions(+), 11 deletions(-)
From: Lee Jones <hidden> Date: 2016-11-22 13:02:19
Don't make up $SUBJECT line format.
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.
Signed-off-by: Mugunthan V N <redacted>
---
include/linux/mfd/ti_am335x_tscadc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Change looks okay though.
For my own reference:
Acked-for-MFD-by: Lee Jones [off-list ref]
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Mugunthan V N <hidden> Date: 2016-11-25 04:57:31
Hi Dmitry Torokhov,
On Thursday 10 November 2016 10:05 PM, Mugunthan V N wrote:
This patch series enables ADC to be clocked at 24MHz as the
TI AM335x ADC driver has already adopted to use DMA to transfer
ADC samples. Now ADC can generated upto 800K Samples per second
with the patch [1] on AM335x BBB and AM437x GP EVM.
when ADC ref clock is set at 24MHz, I am seeing some issue with
touch screen pointer as the pointer jumps to random locations
with free draw application. The issue is due to increase in ADC
clock and charge delay for the touchscreen ADC line duration
reduced.
So the notation of ti,charge-delay in terms of ADC clock is
wrong, it has to be represented in time and driver has to convert
the charge delay time to ADC clocks based on what ADC clock
frequency is set.
Measured the performance with the iio_generic_buffer with the
patch [2] applied
Verified the touch screen on AM335x GP EVM and AM335x BBB LCD7
cape with [3] dts for display and touch screen to work.
Since there are acks from DT and MFD maintainers, can you pull the patch
series if you do not have any more comments.
Regards
Mugunthan V N
From: Lee Jones <hidden> Date: 2016-11-25 09:56:26
On Fri, 25 Nov 2016, Mugunthan V N wrote:
Hi Dmitry Torokhov,
On Thursday 10 November 2016 10:05 PM, Mugunthan V N wrote:
quoted
This patch series enables ADC to be clocked at 24MHz as the
TI AM335x ADC driver has already adopted to use DMA to transfer
ADC samples. Now ADC can generated upto 800K Samples per second
with the patch [1] on AM335x BBB and AM437x GP EVM.
when ADC ref clock is set at 24MHz, I am seeing some issue with
touch screen pointer as the pointer jumps to random locations
with free draw application. The issue is due to increase in ADC
clock and charge delay for the touchscreen ADC line duration
reduced.
So the notation of ti,charge-delay in terms of ADC clock is
wrong, it has to be represented in time and driver has to convert
the charge delay time to ADC clocks based on what ADC clock
frequency is set.
Measured the performance with the iio_generic_buffer with the
patch [2] applied
Verified the touch screen on AM335x GP EVM and AM335x BBB LCD7
cape with [3] dts for display and touch screen to work.
Since there are acks from DT and MFD maintainers, can you pull the patch
series if you do not have any more comments.
Cant do anything without *all* Acks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
From: Mugunthan V N <hidden> Date: 2016-11-29 05:42:00
On Friday 25 November 2016 03:29 PM, Lee Jones wrote:
On Fri, 25 Nov 2016, Mugunthan V N wrote:
quoted
Hi Dmitry Torokhov,
On Thursday 10 November 2016 10:05 PM, Mugunthan V N wrote:
quoted
This patch series enables ADC to be clocked at 24MHz as the
TI AM335x ADC driver has already adopted to use DMA to transfer
ADC samples. Now ADC can generated upto 800K Samples per second
with the patch [1] on AM335x BBB and AM437x GP EVM.
when ADC ref clock is set at 24MHz, I am seeing some issue with
touch screen pointer as the pointer jumps to random locations
with free draw application. The issue is due to increase in ADC
clock and charge delay for the touchscreen ADC line duration
reduced.
So the notation of ti,charge-delay in terms of ADC clock is
wrong, it has to be represented in time and driver has to convert
the charge delay time to ADC clocks based on what ADC clock
frequency is set.
Measured the performance with the iio_generic_buffer with the
patch [2] applied
Verified the touch screen on AM335x GP EVM and AM335x BBB LCD7
cape with [3] dts for display and touch screen to work.
Since there are acks from DT and MFD maintainers, can you pull the patch
series if you do not have any more comments.
Cant do anything without *all* Acks.
Hi Dmitry Torokhov,
Can you provide your inputs on the patch series.
Regards
Mugunthan V N
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Nov 11, 2016 at 01:28:19PM +0530, Mugunthan V N wrote:
ti,charge-delay will be deprecated as it represents number of
clock cycles and the DT entries are done in assumption of 3MHz
TSCADC clock, but clock can be set upto 24MHz. So driver add
support for ti,charge-delay-ns and do not drop support for
ti,charge-delay to support old dtbs and it will be assumed that
it is for 3MHz TSCADC clock and will be calculated as per current
clock speed.
Signed-off-by: Mugunthan V N <redacted>
@@ -379,15 +379,30 @@ static int titsc_parse_dt(struct platform_device *pdev,ts_dev->coordinate_readouts=5;}-err=of_property_read_u32(node,"ti,charge-delay",+err=of_property_read_u32(node,"ti,charge-delay-ns",&ts_dev->charge_delay);-/*-*Ifti,charge-delayvalueisnotspecified,thenuse-*CHARGEDLY_OPENDLYasthedefaultvalue.-*/-if(err<0){-ts_dev->charge_delay=CHARGEDLY_OPENDLY;-dev_warn(&pdev->dev,"ti,charge-delay not specified\n");+if(err>=0){+u64charge_delay=ts_dev->charge_delay;++charge_delay*=ADC_CLK;+do_div(charge_delay,1E9);+ts_dev->charge_delay=(u32)charge_delay;+}else{+err=of_property_read_u32(node,"ti,charge-delay",+&ts_dev->charge_delay);+/*+*Ifti,charge-delayvalueisnotspecified,thenuse+*CHARGEDLY_OPENDLYasthedefaultvalue.+*/+if(err<0){+ts_dev->charge_delay=CHARGEDLY_OPENDLY;+dev_warn(&pdev->dev,"ti,charge-delay not specified\n");+}+/*+*ti,charge-delayisspecifiedwithreferrenceto3MHz,+*soconvertittoinreferrencetocurrentclock+*/+ts_dev->charge_delay*=ADC_CLK/3000000;}returnof_property_read_u32_array(node,"ti,wire-config",
--
2.11.0.rc0.7.gbe5a750
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Nov 29, 2016 at 11:11:35AM +0530, Mugunthan V N wrote:
On Friday 25 November 2016 03:29 PM, Lee Jones wrote:
quoted
On Fri, 25 Nov 2016, Mugunthan V N wrote:
quoted
Hi Dmitry Torokhov,
On Thursday 10 November 2016 10:05 PM, Mugunthan V N wrote:
quoted
This patch series enables ADC to be clocked at 24MHz as the
TI AM335x ADC driver has already adopted to use DMA to transfer
ADC samples. Now ADC can generated upto 800K Samples per second
with the patch [1] on AM335x BBB and AM437x GP EVM.
when ADC ref clock is set at 24MHz, I am seeing some issue with
touch screen pointer as the pointer jumps to random locations
with free draw application. The issue is due to increase in ADC
clock and charge delay for the touchscreen ADC line duration
reduced.
So the notation of ti,charge-delay in terms of ADC clock is
wrong, it has to be represented in time and driver has to convert
the charge delay time to ADC clocks based on what ADC clock
frequency is set.
Measured the performance with the iio_generic_buffer with the
patch [2] applied
Verified the touch screen on AM335x GP EVM and AM335x BBB LCD7
cape with [3] dts for display and touch screen to work.
Since there are acks from DT and MFD maintainers, can you pull the patch
series if you do not have any more comments.
Cant do anything without *all* Acks.
Hi Dmitry Torokhov,
Can you provide your inputs on the patch series.
From: Mugunthan V N <hidden> Date: 2016-12-05 03:55:44
Hi Lee Jones
On Wednesday 30 November 2016 02:39 AM, Dmitry Torokhov wrote:
On Tue, Nov 29, 2016 at 11:11:35AM +0530, Mugunthan V N wrote:
quoted
On Friday 25 November 2016 03:29 PM, Lee Jones wrote:
quoted
On Fri, 25 Nov 2016, Mugunthan V N wrote:
quoted
Hi Dmitry Torokhov,
On Thursday 10 November 2016 10:05 PM, Mugunthan V N wrote:
quoted
This patch series enables ADC to be clocked at 24MHz as the
TI AM335x ADC driver has already adopted to use DMA to transfer
ADC samples. Now ADC can generated upto 800K Samples per second
with the patch [1] on AM335x BBB and AM437x GP EVM.
when ADC ref clock is set at 24MHz, I am seeing some issue with
touch screen pointer as the pointer jumps to random locations
with free draw application. The issue is due to increase in ADC
clock and charge delay for the touchscreen ADC line duration
reduced.
So the notation of ti,charge-delay in terms of ADC clock is
wrong, it has to be represented in time and driver has to convert
the charge delay time to ADC clocks based on what ADC clock
frequency is set.
Measured the performance with the iio_generic_buffer with the
patch [2] applied
Verified the touch screen on AM335x GP EVM and AM335x BBB LCD7
cape with [3] dts for display and touch screen to work.
Since there are acks from DT and MFD maintainers, can you pull the patch
series if you do not have any more comments.
Cant do anything without *all* Acks.
Hi Dmitry Torokhov,
Can you provide your inputs on the patch series.
You have my ack for the input bit.
A gentle ping
Regards
Mugunthan V N
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html