2019-01-22 13:25:18

by Philippe Schenker

[permalink] [raw]
Subject: [PATCH 0/2] Adding DTS to support STMPE811 ADC on Toradex Boards

From: Philippe Schenker <[email protected]>

Hello,

Recently the STMPE811 driver got pulled by MFD (for 5.1).
This patches I'm sending are now adding support for STMPE811 ADC in
devicetree. These patches have been in the STMPE811 ADC driver patchset
but were not pulled by Lee, as they had no reviews and I also corrected
some minor comment errors.


Philippe Schenker (2):
ARM: dts: Add stmpe-adc DT node to Toradex iMX6 modules
ARM: dts: Add stmpe-adc DT node to Toradex T30 modules

arch/arm/boot/dts/imx6qdl-apalis.dtsi | 22 ++++++++++++++--------
arch/arm/boot/dts/imx6qdl-colibri.dtsi | 22 ++++++++++++++--------
arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi | 22 ++++++++++++++--------
arch/arm/boot/dts/tegra30-apalis.dtsi | 22 ++++++++++++++--------
arch/arm/boot/dts/tegra30-colibri.dtsi | 22 ++++++++++++++--------
5 files changed, 70 insertions(+), 40 deletions(-)

--
2.20.1



2019-01-22 13:23:35

by Philippe Schenker

[permalink] [raw]
Subject: [PATCH 1/2] ARM: dts: Add stmpe-adc DT node to Toradex iMX6 modules

From: Philippe Schenker <[email protected]>

Add the stmpe-adc DT node as found on Toradex iMX6 modules

Signed-off-by: Philippe Schenker <[email protected]>
---

arch/arm/boot/dts/imx6qdl-apalis.dtsi | 22 ++++++++++++++--------
arch/arm/boot/dts/imx6qdl-colibri.dtsi | 22 ++++++++++++++--------
2 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
index 8380f1b26826..e8c7ef7e078a 100644
--- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
@@ -332,11 +332,17 @@
id = <0>;
blocks = <0x5>;
irq-trigger = <0x1>;
+ /* 3.25 MHz ADC clock speed */
+ st,adc-freq = <1>;
+ /* 12-bit ADC */
+ st,mod-12b = <1>;
+ /* internal ADC reference */
+ st,ref-sel = <0>;
+ /* ADC converstion time: 80 clocks */
+ st,sample-time = <4>;

stmpe_touchscreen {
compatible = "st,stmpe-ts";
- /* 3.25 MHz ADC clock speed */
- st,adc-freq = <1>;
/* 8 sample average control */
st,ave-ctrl = <3>;
/* 7 length fractional part in z */
@@ -346,17 +352,17 @@
* current limit value
*/
st,i-drive = <1>;
- /* 12-bit ADC */
- st,mod-12b = <1>;
- /* internal ADC reference */
- st,ref-sel = <0>;
- /* ADC converstion time: 80 clocks */
- st,sample-time = <4>;
/* 1 ms panel driver settling time */
st,settling = <3>;
/* 5 ms touch detect interrupt delay */
st,touch-det-delay = <5>;
};
+
+ stmpe_adc {
+ compatible = "st,stmpe-adc";
+ /* forbid to use ADC channels 3-0 (touch) */
+ st,norequest-mask = <0x0F>;
+ };
};
};

diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
index 87e15e7cb32b..eb8603a2444e 100644
--- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
@@ -262,11 +262,17 @@
id = <0>;
blocks = <0x5>;
irq-trigger = <0x1>;
+ /* 3.25 MHz ADC clock speed */
+ st,adc-freq = <1>;
+ /* 12-bit ADC */
+ st,mod-12b = <1>;
+ /* internal ADC reference */
+ st,ref-sel = <0>;
+ /* ADC converstion time: 80 clocks */
+ st,sample-time = <4>;

stmpe_touchscreen {
compatible = "st,stmpe-ts";
- /* 3.25 MHz ADC clock speed */
- st,adc-freq = <1>;
/* 8 sample average control */
st,ave-ctrl = <3>;
/* 7 length fractional part in z */
@@ -276,17 +282,17 @@
* current limit value
*/
st,i-drive = <1>;
- /* 12-bit ADC */
- st,mod-12b = <1>;
- /* internal ADC reference */
- st,ref-sel = <0>;
- /* ADC converstion time: 80 clocks */
- st,sample-time = <4>;
/* 1 ms panel driver settling time */
st,settling = <3>;
/* 5 ms touch detect interrupt delay */
st,touch-det-delay = <5>;
};
+
+ stmpe_adc {
+ compatible = "st,stmpe-adc";
+ /* forbid to use ADC channels 3-0 (touch) */
+ st,norequest-mask = <0x0F>;
+ };
};
};

--
2.20.1


2019-01-22 13:25:07

by Philippe Schenker

[permalink] [raw]
Subject: [PATCH 2/2] ARM: dts: Add stmpe-adc DT node to Toradex T30 modules

From: Philippe Schenker <[email protected]>

Add the stmpe-adc DT node as found on Toradex T30 modules

Signed-off-by: Philippe Schenker <[email protected]>

---

arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi | 22 ++++++++++++++--------
arch/arm/boot/dts/tegra30-apalis.dtsi | 22 ++++++++++++++--------
arch/arm/boot/dts/tegra30-colibri.dtsi | 22 ++++++++++++++--------
3 files changed, 42 insertions(+), 24 deletions(-)

diff --git a/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi b/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
index 02f8126481a2..8b7a827d604d 100644
--- a/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
@@ -994,11 +994,17 @@
id = <0>;
blocks = <0x5>;
irq-trigger = <0x1>;
+ /* 3.25 MHz ADC clock speed */
+ st,adc-freq = <1>;
+ /* 12-bit ADC */
+ st,mod-12b = <1>;
+ /* internal ADC reference */
+ st,ref-sel = <0>;
+ /* ADC converstion time: 80 clocks */
+ st,sample-time = <4>;

stmpe_touchscreen {
compatible = "st,stmpe-ts";
- /* 3.25 MHz ADC clock speed */
- st,adc-freq = <1>;
/* 8 sample average control */
st,ave-ctrl = <3>;
/* 7 length fractional part in z */
@@ -1008,17 +1014,17 @@
* current limit value
*/
st,i-drive = <1>;
- /* 12-bit ADC */
- st,mod-12b = <1>;
- /* internal ADC reference */
- st,ref-sel = <0>;
- /* ADC converstion time: 80 clocks */
- st,sample-time = <4>;
/* 1 ms panel driver settling time */
st,settling = <3>;
/* 5 ms touch detect interrupt delay */
st,touch-det-delay = <5>;
};
+
+ stmpe_adc {
+ compatible = "st,stmpe-adc";
+ /* forbid to use ADC channels 3-0 (touch) */
+ st,norequest-mask = <0x0F>;
+ };
};

/*
diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index 7f112f192fe9..c18f6f61d764 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -976,11 +976,17 @@
id = <0>;
blocks = <0x5>;
irq-trigger = <0x1>;
+ /* 3.25 MHz ADC clock speed */
+ st,adc-freq = <1>;
+ /* 12-bit ADC */
+ st,mod-12b = <1>;
+ /* internal ADC reference */
+ st,ref-sel = <0>;
+ /* ADC converstion time: 80 clocks */
+ st,sample-time = <4>;

stmpe_touchscreen {
compatible = "st,stmpe-ts";
- /* 3.25 MHz ADC clock speed */
- st,adc-freq = <1>;
/* 8 sample average control */
st,ave-ctrl = <3>;
/* 7 length fractional part in z */
@@ -990,17 +996,17 @@
* current limit value
*/
st,i-drive = <1>;
- /* 12-bit ADC */
- st,mod-12b = <1>;
- /* internal ADC reference */
- st,ref-sel = <0>;
- /* ADC converstion time: 80 clocks */
- st,sample-time = <4>;
/* 1 ms panel driver settling time */
st,settling = <3>;
/* 5 ms touch detect interrupt delay */
st,touch-det-delay = <5>;
};
+
+ stmpe_adc {
+ compatible = "st,stmpe-adc";
+ /* forbid to use ADC channels 3-0 (touch) */
+ st,norequest-mask = <0x0F>;
+ };
};

/*
diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi b/arch/arm/boot/dts/tegra30-colibri.dtsi
index 35af03ca9e90..3c421a5cfbc2 100644
--- a/arch/arm/boot/dts/tegra30-colibri.dtsi
+++ b/arch/arm/boot/dts/tegra30-colibri.dtsi
@@ -845,11 +845,17 @@
id = <0>;
blocks = <0x5>;
irq-trigger = <0x1>;
+ /* 3.25 MHz ADC clock speed */
+ st,adc-freq = <1>;
+ /* 12-bit ADC */
+ st,mod-12b = <1>;
+ /* internal ADC reference */
+ st,ref-sel = <0>;
+ /* ADC converstion time: 80 clocks */
+ st,sample-time = <4>;

stmpe_touchscreen {
compatible = "st,stmpe-ts";
- /* 3.25 MHz ADC clock speed */
- st,adc-freq = <1>;
/* 8 sample average control */
st,ave-ctrl = <3>;
/* 7 length fractional part in z */
@@ -859,17 +865,17 @@
* current limit value
*/
st,i-drive = <1>;
- /* 12-bit ADC */
- st,mod-12b = <1>;
- /* internal ADC reference */
- st,ref-sel = <0>;
- /* ADC converstion time: 80 clocks */
- st,sample-time = <4>;
/* 1 ms panel driver settling time */
st,settling = <3>;
/* 5 ms touch detect interrupt delay */
st,touch-det-delay = <5>;
};
+
+ stmpe_adc {
+ compatible = "st,stmpe-adc";
+ /* forbid to use ADC channels 3-0 (touch) */
+ st,norequest-mask = <0x0F>;
+ };
};

/*
--
2.20.1


2019-01-22 14:55:53

by Stefan Agner

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM: dts: Add stmpe-adc DT node to Toradex iMX6 modules

On 22.01.2019 14:21, Philippe Schenker wrote:
> From: Philippe Schenker <[email protected]>
>
> Add the stmpe-adc DT node as found on Toradex iMX6 modules
>
> Signed-off-by: Philippe Schenker <[email protected]>

Reviewed-by: Stefan Agner <[email protected]>

> ---
>
> arch/arm/boot/dts/imx6qdl-apalis.dtsi | 22 ++++++++++++++--------
> arch/arm/boot/dts/imx6qdl-colibri.dtsi | 22 ++++++++++++++--------
> 2 files changed, 28 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi
> b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
> index 8380f1b26826..e8c7ef7e078a 100644
> --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
> @@ -332,11 +332,17 @@
> id = <0>;
> blocks = <0x5>;
> irq-trigger = <0x1>;
> + /* 3.25 MHz ADC clock speed */
> + st,adc-freq = <1>;
> + /* 12-bit ADC */
> + st,mod-12b = <1>;
> + /* internal ADC reference */
> + st,ref-sel = <0>;
> + /* ADC converstion time: 80 clocks */
> + st,sample-time = <4>;
>
> stmpe_touchscreen {
> compatible = "st,stmpe-ts";
> - /* 3.25 MHz ADC clock speed */
> - st,adc-freq = <1>;
> /* 8 sample average control */
> st,ave-ctrl = <3>;
> /* 7 length fractional part in z */
> @@ -346,17 +352,17 @@
> * current limit value
> */
> st,i-drive = <1>;
> - /* 12-bit ADC */
> - st,mod-12b = <1>;
> - /* internal ADC reference */
> - st,ref-sel = <0>;
> - /* ADC converstion time: 80 clocks */
> - st,sample-time = <4>;
> /* 1 ms panel driver settling time */
> st,settling = <3>;
> /* 5 ms touch detect interrupt delay */
> st,touch-det-delay = <5>;
> };
> +
> + stmpe_adc {
> + compatible = "st,stmpe-adc";
> + /* forbid to use ADC channels 3-0 (touch) */
> + st,norequest-mask = <0x0F>;
> + };
> };
> };
>
> diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi
> b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
> index 87e15e7cb32b..eb8603a2444e 100644
> --- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
> @@ -262,11 +262,17 @@
> id = <0>;
> blocks = <0x5>;
> irq-trigger = <0x1>;
> + /* 3.25 MHz ADC clock speed */
> + st,adc-freq = <1>;
> + /* 12-bit ADC */
> + st,mod-12b = <1>;
> + /* internal ADC reference */
> + st,ref-sel = <0>;
> + /* ADC converstion time: 80 clocks */
> + st,sample-time = <4>;
>
> stmpe_touchscreen {
> compatible = "st,stmpe-ts";
> - /* 3.25 MHz ADC clock speed */
> - st,adc-freq = <1>;
> /* 8 sample average control */
> st,ave-ctrl = <3>;
> /* 7 length fractional part in z */
> @@ -276,17 +282,17 @@
> * current limit value
> */
> st,i-drive = <1>;
> - /* 12-bit ADC */
> - st,mod-12b = <1>;
> - /* internal ADC reference */
> - st,ref-sel = <0>;
> - /* ADC converstion time: 80 clocks */
> - st,sample-time = <4>;
> /* 1 ms panel driver settling time */
> st,settling = <3>;
> /* 5 ms touch detect interrupt delay */
> st,touch-det-delay = <5>;
> };
> +
> + stmpe_adc {
> + compatible = "st,stmpe-adc";
> + /* forbid to use ADC channels 3-0 (touch) */
> + st,norequest-mask = <0x0F>;
> + };
> };
> };

2019-01-22 14:56:17

by Stefan Agner

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: dts: Add stmpe-adc DT node to Toradex T30 modules

On 22.01.2019 14:21, Philippe Schenker wrote:
> From: Philippe Schenker <[email protected]>
>
> Add the stmpe-adc DT node as found on Toradex T30 modules
>
> Signed-off-by: Philippe Schenker <[email protected]>

Reviewed-by: Stefan Agner <[email protected]>

>
> ---
>
> arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi | 22 ++++++++++++++--------
> arch/arm/boot/dts/tegra30-apalis.dtsi | 22 ++++++++++++++--------
> arch/arm/boot/dts/tegra30-colibri.dtsi | 22 ++++++++++++++--------
> 3 files changed, 42 insertions(+), 24 deletions(-)
>
> diff --git a/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
> b/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
> index 02f8126481a2..8b7a827d604d 100644
> --- a/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
> +++ b/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
> @@ -994,11 +994,17 @@
> id = <0>;
> blocks = <0x5>;
> irq-trigger = <0x1>;
> + /* 3.25 MHz ADC clock speed */
> + st,adc-freq = <1>;
> + /* 12-bit ADC */
> + st,mod-12b = <1>;
> + /* internal ADC reference */
> + st,ref-sel = <0>;
> + /* ADC converstion time: 80 clocks */
> + st,sample-time = <4>;
>
> stmpe_touchscreen {
> compatible = "st,stmpe-ts";
> - /* 3.25 MHz ADC clock speed */
> - st,adc-freq = <1>;
> /* 8 sample average control */
> st,ave-ctrl = <3>;
> /* 7 length fractional part in z */
> @@ -1008,17 +1014,17 @@
> * current limit value
> */
> st,i-drive = <1>;
> - /* 12-bit ADC */
> - st,mod-12b = <1>;
> - /* internal ADC reference */
> - st,ref-sel = <0>;
> - /* ADC converstion time: 80 clocks */
> - st,sample-time = <4>;
> /* 1 ms panel driver settling time */
> st,settling = <3>;
> /* 5 ms touch detect interrupt delay */
> st,touch-det-delay = <5>;
> };
> +
> + stmpe_adc {
> + compatible = "st,stmpe-adc";
> + /* forbid to use ADC channels 3-0 (touch) */
> + st,norequest-mask = <0x0F>;
> + };
> };
>
> /*
> diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi
> b/arch/arm/boot/dts/tegra30-apalis.dtsi
> index 7f112f192fe9..c18f6f61d764 100644
> --- a/arch/arm/boot/dts/tegra30-apalis.dtsi
> +++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
> @@ -976,11 +976,17 @@
> id = <0>;
> blocks = <0x5>;
> irq-trigger = <0x1>;
> + /* 3.25 MHz ADC clock speed */
> + st,adc-freq = <1>;
> + /* 12-bit ADC */
> + st,mod-12b = <1>;
> + /* internal ADC reference */
> + st,ref-sel = <0>;
> + /* ADC converstion time: 80 clocks */
> + st,sample-time = <4>;
>
> stmpe_touchscreen {
> compatible = "st,stmpe-ts";
> - /* 3.25 MHz ADC clock speed */
> - st,adc-freq = <1>;
> /* 8 sample average control */
> st,ave-ctrl = <3>;
> /* 7 length fractional part in z */
> @@ -990,17 +996,17 @@
> * current limit value
> */
> st,i-drive = <1>;
> - /* 12-bit ADC */
> - st,mod-12b = <1>;
> - /* internal ADC reference */
> - st,ref-sel = <0>;
> - /* ADC converstion time: 80 clocks */
> - st,sample-time = <4>;
> /* 1 ms panel driver settling time */
> st,settling = <3>;
> /* 5 ms touch detect interrupt delay */
> st,touch-det-delay = <5>;
> };
> +
> + stmpe_adc {
> + compatible = "st,stmpe-adc";
> + /* forbid to use ADC channels 3-0 (touch) */
> + st,norequest-mask = <0x0F>;
> + };
> };
>
> /*
> diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi
> b/arch/arm/boot/dts/tegra30-colibri.dtsi
> index 35af03ca9e90..3c421a5cfbc2 100644
> --- a/arch/arm/boot/dts/tegra30-colibri.dtsi
> +++ b/arch/arm/boot/dts/tegra30-colibri.dtsi
> @@ -845,11 +845,17 @@
> id = <0>;
> blocks = <0x5>;
> irq-trigger = <0x1>;
> + /* 3.25 MHz ADC clock speed */
> + st,adc-freq = <1>;
> + /* 12-bit ADC */
> + st,mod-12b = <1>;
> + /* internal ADC reference */
> + st,ref-sel = <0>;
> + /* ADC converstion time: 80 clocks */
> + st,sample-time = <4>;
>
> stmpe_touchscreen {
> compatible = "st,stmpe-ts";
> - /* 3.25 MHz ADC clock speed */
> - st,adc-freq = <1>;
> /* 8 sample average control */
> st,ave-ctrl = <3>;
> /* 7 length fractional part in z */
> @@ -859,17 +865,17 @@
> * current limit value
> */
> st,i-drive = <1>;
> - /* 12-bit ADC */
> - st,mod-12b = <1>;
> - /* internal ADC reference */
> - st,ref-sel = <0>;
> - /* ADC converstion time: 80 clocks */
> - st,sample-time = <4>;
> /* 1 ms panel driver settling time */
> st,settling = <3>;
> /* 5 ms touch detect interrupt delay */
> st,touch-det-delay = <5>;
> };
> +
> + stmpe_adc {
> + compatible = "st,stmpe-adc";
> + /* forbid to use ADC channels 3-0 (touch) */
> + st,norequest-mask = <0x0F>;
> + };
> };
>
> /*

2019-02-12 09:10:37

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 0/2] Adding DTS to support STMPE811 ADC on Toradex Boards

On Fri, Feb 01, 2019 at 11:36:34AM +0800, Shawn Guo wrote:
> On Tue, Jan 22, 2019 at 02:21:33PM +0100, Philippe Schenker wrote:
> > Philippe Schenker (2):
> > ARM: dts: Add stmpe-adc DT node to Toradex iMX6 modules
> > ARM: dts: Add stmpe-adc DT node to Toradex T30 modules
>
> Applied both, thanks.

Sorry, the T30 one shouldn't be applied by me. Dropped from my tree.

Shawn

2019-02-12 09:19:25

by Philippe Schenker

[permalink] [raw]
Subject: Re: [PATCH 0/2] Adding DTS to support STMPE811 ADC on Toradex Boards

On Tue, 2019-02-12 at 17:09 +0800, Shawn Guo wrote:
> On Fri, Feb 01, 2019 at 11:36:34AM +0800, Shawn Guo wrote:
> > On Tue, Jan 22, 2019 at 02:21:33PM +0100, Philippe Schenker wrote:
> > > Philippe Schenker (2):
> > > ARM: dts: Add stmpe-adc DT node to Toradex iMX6 modules
> > > ARM: dts: Add stmpe-adc DT node to Toradex T30 modules
> >
> > Applied both, thanks.
>
> Sorry, the T30 one shouldn't be applied by me. Dropped from my tree.
>
> Shawn

@Thierry could you then please pull "ARM: dts: Add stmpe-adc DT node to Toradex
T30 modules" ? Thanks a lot!

Philippe